Rotation3d

value class Rotation3d(source)

Spatial rotation with unit length up to Double rounding. Factories validate and normalize input. Uses right-handed active rotations of column vectors; a * b applies b first.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val w: Double

The quaternion's w component.

Link copied to clipboard
val x: Double

The quaternion's x component.

Link copied to clipboard
val y: Double

The quaternion's y component.

Link copied to clipboard
val z: Double

The quaternion's z component.

Functions

Link copied to clipboard

Smallest spatial angle in 0, PI, independent of the quaternion's sign.

Link copied to clipboard

Conjugation preserves the existing unit-length error; no additional normalization is needed.

Link copied to clipboard
fun slerp(other: Rotation3d, amount: Double): Rotation3d

Interpolate along the shortest arc; finite amounts outside 0..1 extrapolate if the scaled angle is finite. Zero/one preserve the exact endpoint representation. Huge angles lose trigonometric argument precision. At PI the shortest arc is ambiguous; near PI small changes can switch the selected direction.

Link copied to clipboard
operator fun times(other: Rotation3d): Rotation3d

Composition applying other first, then this rotation.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard