Package gnu.math
Class CQuaternion
- java.lang.Object
-
- java.lang.Number
-
- gnu.math.Numeric
-
- gnu.math.Quantity
-
- gnu.math.Quaternion
-
- gnu.math.CQuaternion
-
- All Implemented Interfaces:
Externalizable
,Serializable
public class CQuaternion extends Quaternion implements Externalizable
General Cartesian Quaternion number (a four-dimensional extension of complex numbers). Use this instead of DQuaternion if you want exact quaternion numbers.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CQuaternion()
CQuaternion(RealNum real, RealNum imag, RealNum jmag, RealNum kmag)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RealNum
im()
The value of the imaginary component, as a RealNum.RealNum
jm()
The value of the "j" component, as a RealNum.RealNum
km()
The value of the "k" component, as a RealNum.RealNum
re()
The value of the real component, as a RealNum.void
readExternal(ObjectInput in)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class gnu.math.Quaternion
abs, add, add, addReversed, angle, classifyFinite, colatitude, compare, compare, complexPart, conjugate, cos, div, divide, divReversed, doubleImagValue, doubleJmagValue, doubleKmagValue, doubleRealValue, doubleValue, equals, equals, exp, isExact, isZero, jmMinusOne, jmOne, kmMinusOne, kmOne, log, longitude, longValue, make, make, mul, mulReversed, neg, neg, number, polar, polar, power, sin, sqrt, tan, times, toExact, toInexact, toString, unitQuaternion, unitVector, vectorPart
-
Methods inherited from class gnu.math.Quantity
add, compare, compareReversed, dimensions, divide, imValue, jmValue, kmValue, make, make, make, reValue, times, unit
-
Methods inherited from class gnu.math.Numeric
add, asNumericOrNull, div_inv, floatValue, geq, grt, intValue, mul_ident, power, sub, toString
-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Method Detail
-
re
public RealNum re()
Description copied from class:Quantity
The 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.
-
im
public RealNum im()
Description copied from class:Quantity
The 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.
-
jm
public RealNum jm()
Description copied from class:Quantity
The 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.
-
km
public RealNum km()
Description copied from class:Quantity
The 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.
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
-