diff --git a/tests/quat.rs b/tests/quat.rs index 251fabfc..cfe2557a 100644 --- a/tests/quat.rs +++ b/tests/quat.rs @@ -1,7 +1,7 @@ extern crate nalgebra as na; extern crate rand; -use na::{Point3, Vector3, Rotation3, UnitQuaternion, Rotation}; +use na::{Point3, Quaternion, Vector3, Rotation3, UnitQuaternion, Rotation, one}; use rand::random; #[test] @@ -90,3 +90,9 @@ fn test_quaternion_angle_between() { 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())) +}