rhodonite
    Preparing search index...

    Class LogQuaternionD

    Logarithm of a quaternion with 64-bit float components. Use this implementation when higher numerical precision is required.

    Hierarchy (View Summary)

    Index

    Internal typed array storage for logarithmic quaternion components (Float32Array or Float64Array)

    • get className(): string

      Gets the class name identifier.

      Returns string

      The string 'LogQuaternion'

    • get w(): number

      Gets the w component of the log quaternion. Always returns 1 for log quaternions.

      Returns number

      Always returns 1

    • get x(): number

      Gets the x component of the log quaternion.

      Returns number

      The x component value

    • get y(): number

      Gets the y component of the log quaternion.

      Returns number

      The y component value

    • get z(): number

      Gets the z component of the log quaternion.

      Returns number

      The z component value

    • Converts a regular quaternion to its logarithmic form.

      Uses the formula log(q) = (θ / sin(θ)) * (x, y, z) where θ = acos(w). When θ is 0 (identity rotation) the result is a zero log quaternion. When θ is close to π the logarithm is not representable and a zero log quaternion is returned instead of Infinity/NaN.

      Parameters

      Returns ILogQuaternion

      A new log quaternion representing the logarithm of the input quaternion

    • Creates a log quaternion from individual x, y, z component values.

      Parameters

      • x: number
      • y: number
      • z: number

      Returns LogQuaternionD

    • Creates a log quaternion from an array by copying the first 3 values.

      Parameters

      • array: number[]

      Returns LogQuaternionD

    • Creates a log quaternion from a 3-element array by copying the values.

      Parameters

      Returns LogQuaternionD

    • Creates a log quaternion that directly uses the given Float64Array (no copy).

      Parameters

      • array: Float64Array

      Returns LogQuaternionD