-
Notifications
You must be signed in to change notification settings - Fork 0
Axis‐Angle
ExodusCoder9 edited this page Jun 20, 2026
·
1 revision
AxisAngle4d and AxisAngle4f are immutable Java records representing a rotation as an axis and angle.
AxisAngle4d aa = new AxisAngle4d(axisX, axisY, axisZ, angle);
AxisAngle4d aa = new AxisAngle4d(quaternion);
Fields
double x = aa.x(); // axis X component
double y = aa.y(); // axis Y component
double z = aa.z(); // axis Z component
double angle = aa.angle(); // rotation angle in radians
Conversion
Quaterniond q = aa.toQuaternion();
Vector3d rotated = aa.rotate(v);