pub struct Fp32(pub i32);Expand description
Q16.16 Sabit Noktalı Sayı (32-bit)
16 bit tam sayı kısmı, 16 bit ondalık kısmı temsil eder.
Tuple Fields§
§0: i32Implementations§
Source§impl Fp32
impl Fp32
pub const SHIFT: usize = 16
pub const ONE_RAW: i32
pub const ZERO: Self
pub const ONE: Self
pub const MINUS_ONE: Self
pub const MAX: Self
pub const MIN: Self
pub const PI: Self
pub const TWO_PI: Self
pub const HALF_PI: Self
pub const fn from_raw(raw: i32) -> Self
pub fn from_i32(val: i32) -> Self
pub fn from_f32(val: f32) -> Self
pub fn to_f32(self) -> f32
pub fn to_i32(self) -> i32
pub fn abs(self) -> Self
Sourcepub fn sqrt(self) -> Self
pub fn sqrt(self) -> Self
Bit-exact Karekök (Sqrt) - Newton-Raphson veya Integer Sqrt algoritması
pub fn cos(self) -> Self
Trait Implementations§
Source§impl AddAssign for Fp32
impl AddAssign for Fp32
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl<'de> Deserialize<'de> for Fp32
impl<'de> Deserialize<'de> for Fp32
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DivAssign for Fp32
impl DivAssign for Fp32
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl MulAssign for Fp32
impl MulAssign for Fp32
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl Ord for Fp32
impl Ord for Fp32
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Fp32
impl PartialOrd for Fp32
Source§impl SubAssign for Fp32
impl SubAssign for Fp32
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for Fp32
impl Eq for Fp32
impl StructuralPartialEq for Fp32
Auto Trait Implementations§
impl Freeze for Fp32
impl RefUnwindSafe for Fp32
impl Send for Fp32
impl Sync for Fp32
impl Unpin for Fp32
impl UnsafeUnpin for Fp32
impl UnwindSafe for Fp32
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more