-
- All Known Implementing Classes:
Complexd
,Quaterniond
public interface Imaginaryd
Represents an imaginary number.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Imaginaryd
conjugate()
Returns the conjugated imaginary number.Imaginaryd
div(double a)
Divides the imaginary number by the given scalar.Imaginaryd
invert()
Returns the inverts imaginary number.double
length()
Returns the length of the imaginary number.double
lengthSquared()
Returns the square of the length of the imaginary number.Imaginaryd
mul(double a)
Multiplies the imaginary number by the given scalar.Imaginaryd
normalize()
Normalizes the imaginary number.Imaginaryd
toDouble()
Imaginaryf
toFloat()
-
-
-
Method Detail
-
mul
Imaginaryd mul(double a)
Multiplies the imaginary number by the given scalar.- Parameters:
a
- The scalar to multiply by- Returns:
- The multiplied imaginary number
-
div
Imaginaryd div(double a)
Divides the imaginary number by the given scalar.- Parameters:
a
- The scalar to divide by- Returns:
- The multiplied imaginary number
-
conjugate
Imaginaryd conjugate()
Returns the conjugated imaginary number.- Returns:
- The conjugate
-
invert
Imaginaryd invert()
Returns the inverts imaginary number.- Returns:
- The inverse
-
length
double length()
Returns the length of the imaginary number.- Returns:
- The length
-
lengthSquared
double lengthSquared()
Returns the square of the length of the imaginary number.- Returns:
- The square of the length
-
normalize
Imaginaryd normalize()
Normalizes the imaginary number.- Returns:
- The imaginary number, but of unit length
-
toFloat
Imaginaryf toFloat()
-
toDouble
Imaginaryd toDouble()
-
-