cgmath/test/test_quat.rs

29 lines
602 B
Rust
Raw Normal View History

2012-09-08 08:54:32 +00:00
import omath::mat::*;
import omath::quat::*;
import omath::vec::*;
2012-09-08 06:08:36 +00:00
2012-09-07 10:48:47 +00:00
// TODO
#[test]
fn test_quat() {
2012-09-08 06:08:36 +00:00
let a = quat { data: [ 1f, 2f, 3f, 4f ] };
// let b = quat { data: [ 5f, 6f, 7f, 8f ] };
// let f1 = 1.5f;
// let f2 = 0.5f;
assert a == quat(1f, 2f, 3f, 4f);
assert quat_zero == quat(0f, 0f, 0f, 0f);
assert quat_identity == quat(1f, 0f, 0f, 0f);
assert a[0] == 1f;
assert a[1] == 2f;
assert a[2] == 3f;
assert a[3] == 4f;
assert a.w() == 1f;
assert a.x() == 2f;
assert a.y() == 3f;
assert a.z() == 4f;
2012-09-07 10:48:47 +00:00
2012-09-08 06:08:36 +00:00
// TODO
2012-09-07 10:48:47 +00:00
}