We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 891a150 commit ccf3cb7Copy full SHA for ccf3cb7
tests/matrix.rs
@@ -726,6 +726,35 @@ pub mod matrix3 {
726
);
727
}
728
729
+
730
+ #[test]
731
+ fn test_look_at_lh() {
732
+ let dir = Vector3::new(1.0, 2.0, 3.0).normalize();
733
+ let up = Vector3::unit_y();
734
+ let m = Matrix3::look_at_lh(dir, up);
735
736
+ assert_ulps_eq!(m, Matrix3::from([
737
+ [0.9486833, -0.16903085, 0.26726127],
738
+ [0.0, 0.8451542, 0.53452253],
739
+ [-0.31622776, -0.50709254, 0.8017838_f32]
740
+ ]));
741
742
+ #[allow(deprecated)]
743
+ assert_ulps_eq!(m, Matrix3::look_at(dir, up));
744
+ }
745
746
747
+ fn test_look_at_rh() {
748
749
750
+ let m = Matrix3::look_at_rh(dir, up);
751
752
753
+ [-0.9486833, -0.16903085, -0.26726127],
754
+ [0.0, 0.8451542, -0.53452253],
755
+ [0.31622776, -0.50709254, -0.8017838_f32]
756
757
758
759
760
pub mod matrix4 {
0 commit comments