Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Transform::{look_at_rh, look_at_lh} and deprecate look_at (continued) #514

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Revert look_at test changes
Previously look_at functions were erroneously renamed to look_to_{lh|rh} as a response to deprecation warnings. Instead what should've happened is that `allow(deprecated)` annotations are fixed to suppress tests that verify that deprecated functions are working. This commit reintroduced the tests for deprecated functions and suppresses the deprecation warnings.
  • Loading branch information
elrnv committed Nov 23, 2020
commit f2284a54a738cb825362138b08c8161b8fed73ec
8 changes: 6 additions & 2 deletions tests/matrix.rs
Original file line number Diff line number Diff line change
@@ -740,7 +740,9 @@ pub mod matrix3 {
]));

#[allow(deprecated)]
assert_ulps_eq!(m, Matrix3::look_to_lh(dir, up));
{
assert_ulps_eq!(m, Matrix3::look_at(dir, up));
}
}

#[test]
@@ -1164,7 +1166,9 @@ pub mod matrix4 {

let m = Matrix4::look_to_rh(eye, dir, up);
#[allow(deprecated)]
assert_ulps_eq!(m, Matrix4::look_to_rh(eye, dir, up));
{
assert_ulps_eq!(m, Matrix4::look_at_dir(eye, dir, up));
}

let expected = Matrix4::from([
[-0.9486833, -0.16903086, -0.26726127, 0.0],