Quaternion

data class Quaternion(w: Double, x: Double, y: Double, z: Double)

Represents double-based quaternion.

Constructors

Link copied to clipboard
fun Quaternion(w: Number, x: Number, y: Number, z: Number)
Link copied to clipboard
fun Quaternion(w: Number, x: Number, y: Number)
Link copied to clipboard
fun Quaternion(w: Number, x: Number)
Link copied to clipboard
fun Quaternion(w: Number)
Link copied to clipboard
fun Quaternion(wx: Complex, yz: Complex)
Link copied to clipboard
fun Quaternion(wx: Complex)
Link copied to clipboard
fun Quaternion(w: Double, x: Double, y: Double, z: Double)

Types

Link copied to clipboard
object Companion : MemorySpec<Quaternion>

Functions

Link copied to clipboard
open override fun toString(): String

Returns a string representation of this quaternion.

Properties

Link copied to clipboard
val w: Double

The first component.

Link copied to clipboard
val x: Double

The second component.

Link copied to clipboard
val y: Double

The third component.

Link copied to clipboard
val z: Double

The fourth component.

Extensions

Link copied to clipboard
val Quaternion.conjugate: Quaternion

This quaternion's conjugate.

Link copied to clipboard
open operator fun Quaternion.div(arg: Quaternion): Quaternion
open operator fun Quaternion.div(k: Number): Quaternion
Link copied to clipboard
open operator override fun Quaternion.minus(other: Number): Quaternion
open operator fun Quaternion.minus(arg: Quaternion): Quaternion
Link copied to clipboard
open operator override fun Quaternion.plus(other: Number): Quaternion
open operator fun Quaternion.plus(arg: Quaternion): Quaternion
Link copied to clipboard
open infix fun Quaternion.pow(pow: Number): Quaternion
Link copied to clipboard
val Quaternion.r: Double

Absolute value of the quaternion.

Link copied to clipboard
val Quaternion.reciprocal: Quaternion

This quaternion's reciprocal.

Link copied to clipboard
open operator fun Quaternion.times(arg: Quaternion): Quaternion
open operator fun Quaternion.times(k: Number): Quaternion
Link copied to clipboard
open operator override fun Quaternion.unaryMinus(): Quaternion
Link copied to clipboard
open operator fun Quaternion.unaryPlus(): Quaternion

Sources

Link copied to clipboard