exception Quaternion_exception of string
Raised when an error occurs (usually a division by zero)
This module defines the quaternion type and various operations on it
exception Quaternion_exception of string
type t = {r : float; i : float; j : float; k : float}
r : float
|
|
i : float
|
|
j : float
|
|
k : float
|
val zero : t
val one : t
val real : float -> t
val add : t -> t -> t
val times : t -> t -> t
val prop : float -> t -> t
val sub : t -> t -> t
sub q1 q2
returns the quaternion q1 - q2
val rotation : Vector3f.t -> float -> t
val conj : t -> t
val inverse : t -> t
val squared_norm : t -> float
val norm : t -> float
val normalize : t -> t