Fix comments on Quat::from_angle_{x|y|z} functions
This commit is contained in:
parent
ba71cb4a37
commit
e9fcf971da
1 changed files with 3 additions and 3 deletions
|
@ -47,21 +47,21 @@ Quat<S> {
|
|||
Quat { s: s, v: v }
|
||||
}
|
||||
|
||||
/// Create a matrix from a rotation around the `x` axis (pitch).
|
||||
/// Create a quaternion from a rotation around the `x` axis (pitch).
|
||||
#[inline]
|
||||
pub fn from_angle_x(theta: Rad<S>) -> Quat<S> {
|
||||
let (s, c) = sin_cos(theta.mul_s(cast(0.5).unwrap()));
|
||||
Quat::new(c, s, zero(), zero())
|
||||
}
|
||||
|
||||
/// Create a matrix from a rotation around the `y` axis (yaw).
|
||||
/// Create a quaternion from a rotation around the `y` axis (yaw).
|
||||
#[inline]
|
||||
pub fn from_angle_y(theta: Rad<S>) -> Quat<S> {
|
||||
let (s, c) = sin_cos(theta.mul_s(cast(0.5).unwrap()));
|
||||
Quat::new(c, zero(), s, zero())
|
||||
}
|
||||
|
||||
/// Create a matrix from a rotation around the `z` axis (roll).
|
||||
/// Create a quaternion from a rotation around the `z` axis (roll).
|
||||
#[inline]
|
||||
pub fn from_angle_z(theta: Rad<S>) -> Quat<S> {
|
||||
let (s, c) = sin_cos(theta.mul_s(cast(0.5).unwrap()));
|
||||
|
|
Loading…
Reference in a new issue