common: integer: angle constructor

This commit is contained in:
Quaternions 2025-03-19 16:12:32 -07:00
parent 6594ffa87e
commit 02615af1fd

@ -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!