Rotation3f

value class Rotation3f(source)

Spatial rotation with unit length up to Float 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: Float

The quaternion's w component.

Link copied to clipboard
val x: Float

The quaternion's x component.

Link copied to clipboard
val y: Float

The quaternion's y component.

Link copied to clipboard
val z: Float

The quaternion's z component.

Functions

Link copied to clipboard
fun angleTo(other: Rotation3f): Float

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: Rotation3f, amount: Float): Rotation3f

Shortest-arc interpolation with Double intermediates; finite amounts outside 0..1 extrapolate. Huge angles lose trigonometric argument precision. Near PI the shortest direction can switch.

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

Composition applying other first, then this rotation.

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