Skip to content

Commit

Permalink
fix: tests build
Browse files Browse the repository at this point in the history
  • Loading branch information
0x00002a committed Feb 12, 2024
1 parent d6ce8cd commit 52f0019
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions citro3d/src/math/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,25 +247,13 @@ mod tests {
assert_abs_diff_eq!(l / 2.0, FVec4::splat(0.5));
}

#[test]
fn matrix3() {
let l = Matrix3::diagonal(1.0, 2.0, 3.0);
let r = Matrix3::identity();
let (l, r) = (&l, &r);

assert_abs_diff_eq!(&(l * r), l);
assert_abs_diff_eq!(&(l + r), &Matrix3::diagonal(2.0, 3.0, 4.0));
assert_abs_diff_eq!(&(l - r), &Matrix3::diagonal(0.0, 1.0, 2.0));
}

#[test]
fn matrix4() {
let l = Matrix4::diagonal(1.0, 2.0, 3.0, 4.0);
let r = Matrix4::identity();
let (l, r) = (&l, &r);

assert_abs_diff_eq!(&(l * r), l);
assert_abs_diff_eq!(&(l + r), &Matrix4::diagonal(2.0, 3.0, 4.0, 5.0));
assert_abs_diff_eq!(&(l - r), &Matrix4::diagonal(0.0, 1.0, 2.0, 3.0));
assert_abs_diff_eq!(l * r, l);
assert_abs_diff_eq!(l + r, Matrix4::diagonal(2.0, 3.0, 4.0, 5.0));
assert_abs_diff_eq!(l - r, Matrix4::diagonal(0.0, 1.0, 2.0, 3.0));
}
}

0 comments on commit 52f0019

Please sign in to comment.