toQuaternion

fun Number.toQuaternion(): Quaternion

Creates a quaternion with real part equal to this real.

Receiver

the real part.

Return

a new quaternion.


fun Complex.toQuaternion(): Quaternion

Creates a quaternion with w-component equal to re-component of given complex and x-component equal to im-component of given complex.

Receiver

the complex number.

Return

a new quaternion.