diff --git a/lib/common/src/integer.rs b/lib/common/src/integer.rs index a9364e72d..a9b0cee18 100644 --- a/lib/common/src/integer.rs +++ b/lib/common/src/integer.rs @@ -401,6 +401,10 @@ impl Angle32{ pub const NEG_FRAC_PI_2:Self=Self(-1<<30); pub const PI:Self=Self(-1<<31); #[inline] + pub const fn raw(num:i32)->Self{ + Self(num) + } + #[inline] pub const fn wrap_from_i64(theta:i64)->Self{ //take lower bits //note: this was checked on compiler explorer and compiles to 1 instruction!