Package gnu.math
Class DQuaternion
java.lang.Object
java.lang.Number
gnu.math.Numeric
gnu.math.Quantity
gnu.math.Quaternion
gnu.math.DQuaternion
- All Implemented Interfaces:
Externalizable,Serializable
A quaternion number using plain double values.
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn this + k * obj.static Quaternioncos(double x_re, double x_im, double x_jm, double x_km) static Quaterniondiv(double x_re, double x_im, double x_jm, double x_km, double y_re, double y_im, double y_jm, double y_km) doubleThe value of the imaginary component, as a double.doubleThe value of the "j" component, as a double.doubleThe value of the "k" component, as a double.doubleThe value of the real component, as a double.booleanstatic Quaternionexp(double x_re, double x_im, double x_jm, double x_km) static doublehypot3(double x, double y, double z) static doublehypot4(double w, double x, double y, double z) im()The value of the imaginary component, as a RealNum.booleanisExact()jm()The value of the "j" component, as a RealNum.km()The value of the "k" component, as a RealNum.static Quaternionlog(double x_re, double x_im, double x_jm, double x_km) final Numericneg()static Quaternionpower(double x_re, double x_im, double x_jm, double x_km, double y_re, double y_im, double y_jm, double y_km) re()The value of the real component, as a RealNum.voidstatic Quaternionsin(double x_re, double x_im, double x_jm, double x_km) static Quaternionsqrt(double x_re, double x_im, double x_jm, double x_km) static Quaterniontan(double x_re, double x_im, double x_jm, double x_km) toExact()toString()toString(int radix) voidMethods inherited from class gnu.math.Quaternion
abs, add, addReversed, angle, classifyFinite, colatitude, compare, compare, complexPart, conjugate, cos, divide, divReversed, doubleRealValue, equals, exp, isZero, jmMinusOne, jmOne, kmMinusOne, kmOne, log, longitude, longValue, make, make, mulReversed, neg, number, polar, polar, power, sin, sqrt, tan, times, toInexact, unitQuaternion, unitVector, vectorPartMethods inherited from class gnu.math.Quantity
add, compare, compareReversed, dimensions, divide, imValue, jmValue, kmValue, make, make, make, reValue, times, unitMethods inherited from class gnu.math.Numeric
add, asNumericOrNull, div_inv, floatValue, geq, grt, intValue, mul_ident, power, subMethods inherited from class java.lang.Number
byteValue, shortValue
-
Constructor Details
-
DQuaternion
public DQuaternion() -
DQuaternion
public DQuaternion(double real, double imag, double jmag, double kmag)
-
-
Method Details
-
re
Description copied from class:QuantityThe value of the real component, as a RealNum. The unit() is not factored in, so you actually need to multiply by unit() to get the true real component. -
doubleValue
public double doubleValue()Description copied from class:QuantityThe value of the real component, as a double. This is relative to the unit().dims - i.e. unit()/doubleValue() is factored in.- Overrides:
doubleValuein classQuaternion
-
im
Description copied from class:QuantityThe value of the imaginary component, as a RealNum. The unit() is not factored in, so you actually need to multiply by unit() to get the true imaginary component. -
doubleImagValue
public double doubleImagValue()Description copied from class:QuantityThe value of the imaginary component, as a double. This is relative to the unit().dims - i.e. unit()/doubleValue() is factored in.- Overrides:
doubleImagValuein classQuaternion
-
jm
Description copied from class:QuantityThe value of the "j" component, as a RealNum. The unit() is not factored in, so you actually need to multiply by unit() to get the true "j" component. -
doubleJmagValue
public double doubleJmagValue()Description copied from class:QuantityThe value of the "j" component, as a double. This is relative to the unit().dims - i.e. unit()/doubleValue() is factored in.- Overrides:
doubleJmagValuein classQuaternion
-
km
Description copied from class:QuantityThe value of the "k" component, as a RealNum. The unit() is not factored in, so you actually need to multiply by unit() to get the true "k" component. -
doubleKmagValue
public double doubleKmagValue()Description copied from class:QuantityThe value of the "k" component, as a double. This is relative to the unit().dims - i.e. unit()/doubleValue() is factored in.- Overrides:
doubleKmagValuein classQuaternion
-
isExact
public boolean isExact()- Overrides:
isExactin classQuaternion
-
toExact
- Overrides:
toExactin classQuaternion
-
equals
- Overrides:
equalsin classQuaternion
-
toString
-
toString
- Overrides:
toStringin classQuaternion
-
neg
- Overrides:
negin classQuaternion
-
add
Description copied from class:NumericReturn this + k * obj.- Overrides:
addin classQuaternion
-
mul
- Overrides:
mulin classQuaternion
-
div
- Overrides:
divin classQuaternion
-
hypot4
public static double hypot4(double w, double x, double y, double z) -
hypot3
public static double hypot3(double x, double y, double z) -
power
public static Quaternion power(double x_re, double x_im, double x_jm, double x_km, double y_re, double y_im, double y_jm, double y_km) -
exp
-
log
-
div
public static Quaternion div(double x_re, double x_im, double x_jm, double x_km, double y_re, double y_im, double y_jm, double y_km) -
sqrt
-
sin
-
cos
-
tan
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-