Added a test for Quaternion::exp().
This commit is contained in:
parent
988d9272d2
commit
f9c1a2fd98
|
@ -1,7 +1,7 @@
|
||||||
extern crate nalgebra as na;
|
extern crate nalgebra as na;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
|
||||||
use na::{Point3, Vector3, Rotation3, UnitQuaternion, Rotation};
|
use na::{Point3, Quaternion, Vector3, Rotation3, UnitQuaternion, Rotation, one};
|
||||||
use rand::random;
|
use rand::random;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -90,3 +90,9 @@ fn test_quaternion_angle_between() {
|
||||||
|
|
||||||
assert!(na::approx_eq(&na::norm(&na::rotation(&delta)), &delta_angle))
|
assert!(na::approx_eq(&na::norm(&na::rotation(&delta)), &delta_angle))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_quaternion_exp_zero_is_one() {
|
||||||
|
let q = Quaternion::new(0., 0., 0., 0.);
|
||||||
|
assert!(na::approx_eq(&q.exp(), &one()))
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue