Package gnu.math

Class CQuaternion

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable

    public class CQuaternion
    extends Quaternion
    implements java.io.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
    • 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.
        Overrides:
        re in class Quantity
      • 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.
        Overrides:
        im in class Quantity
      • 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.
        Overrides:
        jm in class Quantity
      • 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.
        Overrides:
        km in class Quantity
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException