Rotation3d
classin packageklyn.math.geometry
public final class Rotation3d
Rotation3d

Immutable right-handed rotation, represented by a unit quaternion. Angles are radians. Example: r = Rotation3d.axisAngle(Vector3d(0.0, 1.0, 0.0), Math.PI)

Properties
Modifier and Type Member Description
public readonly property quaternion
quaternion as Quaternion<Double>
Returns a defensive copy, O(1).
Constructors
Modifier and Type Member Description
public Rotation3d
Rotation3d(quaternion as Quaternion<Double> = Quaternion<Double>(1.0))
Normalizes and copies the quaternion; rejects zero/non-finite input.
Methods
Modifier and Type Member Description
public apply
apply(vector as Vector3d<Double>) as Vector3d<Double>
Rotates a vector, preserving its length.
public static axisAngle
axisAngle(axis as Vector3d<Double>, angle as Double) as Rotation3d
Creates a rotation about a nonzero axis; angle in radians.
public inverse
inverse() as Rotation3d
Inverse rotation.
Operators
Modifier and Type Member Description
public static operator*(a as Rotation3d, b as Rotation3d) as Rotation3d Composition: applies b, then a.