diff --git a/dhc/src/input/types.rs b/dhc/src/input/types.rs index da1d1e3..c60512a 100644 --- a/dhc/src/input/types.rs +++ b/dhc/src/input/types.rs @@ -10,6 +10,10 @@ impl Axis { } pub fn set_value(&mut self, value: f32) { + if value < 0.0 || value > 1.0 { + panic!("invalid axis value: {}", value); + } + self.0 = value; } }