You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
421 B
Rust
18 lines
421 B
Rust
use vector_victor::{swizzle, Matrix};
|
|
|
|
#[test]
|
|
fn test_swizzle() {
|
|
let identity = Matrix::<i32, 4, 4>::identity();
|
|
|
|
assert_eq!(
|
|
swizzle!(identity, a, x, b, (1 + 0), { 2 - 3 }),
|
|
Matrix::mat([
|
|
[0, 0, 0, 1], // a
|
|
[1, 0, 0, 0], // x
|
|
[0, 0, 1, 0], // b
|
|
[0, 1, 0, 0], // row 1
|
|
[-1, -1, -1, -1] // fill(-1)
|
|
])
|
|
);
|
|
}
|