11 lines
300 B
Rust
11 lines
300 B
Rust
// file: crates/engines/engine-v1-common/unit_tests/pointer.rs
|
|
// version: 1
|
|
|
|
#[test]
|
|
fn normalized_pointer_clamps_coordinates() {
|
|
let pointer = crate::PointerState::normalized(true, -0.5, 1.5);
|
|
assert!(pointer.active());
|
|
assert_eq!(pointer.x(), 0.0);
|
|
assert_eq!(pointer.y(), 1.0);
|
|
}
|