toQuaternion

fun Number.toQuaternion(): Quaternion

Creates a quaternion with real part equal to this real.

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.

Return

a new quaternion.