Quaternion

external class Quaternion(var x: Double = definedExternally, var y: Double = definedExternally, var z: Double = definedExternally, var w: Double = definedExternally)(source)

A set of 4-dimensional coordinates used to represent rotation in 3-dimensional space.

See also

Constructors

Link copied to clipboard
constructor(x: Double = definedExternally, y: Double = definedExternally, z: Double = definedExternally, w: Double = definedExternally)

Types

Link copied to clipboard

Properties

Link copied to clipboard
var w: Double

The W component. Default value - 0.0

Link copied to clipboard
var x: Double

The X component. Default value - 0.0

Link copied to clipboard
var y: Double

The Y component. Default value - 0.0

Link copied to clipboard
var z: Double

The Z component. Default value - 0.0

Functions

Link copied to clipboard
fun clone(result: Quaternion? = definedExternally): Quaternion

Duplicates this Quaternion instance.

Link copied to clipboard
fun equalsEpsilon(right: Quaternion? = definedExternally, epsilon: Double? = definedExternally): Boolean

Compares this and the provided quaternion componentwise and returns true if they are within the provided epsilon, false otherwise.