Struct simba::scalar::FixedI16 [−][src]
#[repr(transparent)]pub struct FixedI16<Fract>(pub FixedI16<Fract>);
Expand description
Signed fixed-point number with a generic number of bits for the fractional part.
Implementations
Trait Implementations
impl<Fract: LeEqU16> AbsDiffEq<FixedI16<Fract>> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> AbsDiffEq<FixedI16<Fract>> for FixedI16<Fract>
[src]type Epsilon = Self
type Epsilon = Self
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
fn default_epsilon() -> Self::Epsilon
[src]The default tolerance to use when testing values that are close together. Read more
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
[src]
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
[src]A test for equality that uses the absolute difference to compute the approximate equality of two numbers. Read more
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
[src]
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
[src]The inverse of AbsDiffEq::abs_diff_eq
.
impl<Fract: LeEqU16> AddAssign<FixedI16<Fract>> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> AddAssign<FixedI16<Fract>> for FixedI16<Fract>
[src]fn add_assign(&mut self, rhs: Self)
[src]
fn add_assign(&mut self, rhs: Self)
[src]Performs the +=
operation. Read more
impl<Fract: Send + Sync + 'static> ComplexField for FixedI16<Fract> where
Fract: Unsigned + LeEqU16 + IsLessOrEqual<U15, Output = True> + IsLessOrEqual<U14, Output = True> + IsLessOrEqual<U13, Output = True> + IsLessOrEqual<U12, Output = True>,
[src]
impl<Fract: Send + Sync + 'static> ComplexField for FixedI16<Fract> where
Fract: Unsigned + LeEqU16 + IsLessOrEqual<U15, Output = True> + IsLessOrEqual<U14, Output = True> + IsLessOrEqual<U13, Output = True> + IsLessOrEqual<U12, Output = True>,
[src]type RealField = Self
fn from_real(re: Self::RealField) -> Self
[src]
fn from_real(re: Self::RealField) -> Self
[src]Builds a pure-real complex number from the given value.
fn norm1(self) -> Self::RealField
[src]
fn norm1(self) -> Self::RealField
[src]The sum of the absolute value of this complex number’s real and imaginary part.
fn modulus_squared(self) -> Self::RealField
[src]
fn modulus_squared(self) -> Self::RealField
[src]The squared modulus of this complex number.
fn to_exp(self) -> (Self, Self)
[src]
fn to_exp(self) -> (Self, Self)
[src]The exponential form of this complex number: (modulus, e^{i arg})
fn recip(self) -> Self
[src]
fn conjugate(self) -> Self
[src]
fn floor(self) -> Self
[src]
fn ceil(self) -> Self
[src]
fn round(self) -> Self
[src]
fn trunc(self) -> Self
[src]
fn fract(self) -> Self
[src]
fn mul_add(self, a: Self, b: Self) -> Self
[src]
fn powi(self, _n: i32) -> Self
[src]
fn powf(self, _n: Self) -> Self
[src]
fn powc(self, _n: Self) -> Self
[src]
fn sqrt(self) -> Self
[src]
fn try_sqrt(self) -> Option<Self>
[src]
fn exp(self) -> Self
[src]
fn exp2(self) -> Self
[src]
fn exp_m1(self) -> Self
[src]
fn ln_1p(self) -> Self
[src]
fn ln(self) -> Self
[src]
fn log(self, _base: Self) -> Self
[src]
fn log2(self) -> Self
[src]
fn log10(self) -> Self
[src]
fn cbrt(self) -> Self
[src]
fn hypot(self, _other: Self) -> Self::RealField
[src]
fn hypot(self, _other: Self) -> Self::RealField
[src]Computes (self.conjugate() * self + other.conjugate() * other).sqrt()
fn sin(self) -> Self
[src]
fn cos(self) -> Self
[src]
fn tan(self) -> Self
[src]
fn asin(self) -> Self
[src]
fn acos(self) -> Self
[src]
fn atan(self) -> Self
[src]
fn sin_cos(self) -> (Self, Self)
[src]
fn sinh(self) -> Self
[src]
fn cosh(self) -> Self
[src]
fn tanh(self) -> Self
[src]
fn asinh(self) -> Self
[src]
fn acosh(self) -> Self
[src]
fn atanh(self) -> Self
[src]
fn is_finite(&self) -> bool
[src]
fn to_polar(self) -> (Self::RealField, Self::RealField)
[src]
fn to_polar(self) -> (Self::RealField, Self::RealField)
[src]The polar form of this complex number: (modulus, arg)
fn sinh_cosh(self) -> (Self, Self)
[src]
fn sinhc(self) -> Self
[src]
fn coshc(self) -> Self
[src]
impl<'de, Fract: LeEqU16> Deserialize<'de> for FixedI16<Fract>
[src]
impl<'de, Fract: LeEqU16> Deserialize<'de> for FixedI16<Fract>
[src]fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]Deserialize this value from the given Serde deserializer. Read more
impl<Fract: LeEqU16> DivAssign<FixedI16<Fract>> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> DivAssign<FixedI16<Fract>> for FixedI16<Fract>
[src]fn div_assign(&mut self, rhs: Self)
[src]
fn div_assign(&mut self, rhs: Self)
[src]Performs the /=
operation. Read more
impl<Fract: LeEqU16> DivAssign<i16> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> DivAssign<i16> for FixedI16<Fract>
[src]fn div_assign(&mut self, rhs: i16)
[src]
fn div_assign(&mut self, rhs: i16)
[src]Performs the /=
operation. Read more
impl<Fract: LeEqU16> FromPrimitive for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> FromPrimitive for FixedI16<Fract>
[src]fn from_i64(n: i64) -> Option<Self>
[src]
fn from_i64(n: i64) -> Option<Self>
[src]Converts an i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
fn from_u64(n: u64) -> Option<Self>
[src]
fn from_u64(n: u64) -> Option<Self>
[src]Converts an u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
fn from_isize(n: isize) -> Option<Self>
[src]
fn from_isize(n: isize) -> Option<Self>
[src]Converts an isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
fn from_i8(n: i8) -> Option<Self>
[src]
fn from_i8(n: i8) -> Option<Self>
[src]Converts an i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
fn from_i16(n: i16) -> Option<Self>
[src]
fn from_i16(n: i16) -> Option<Self>
[src]Converts an i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
fn from_i32(n: i32) -> Option<Self>
[src]
fn from_i32(n: i32) -> Option<Self>
[src]Converts an i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
fn from_usize(n: usize) -> Option<Self>
[src]
fn from_usize(n: usize) -> Option<Self>
[src]Converts a usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
fn from_u8(n: u8) -> Option<Self>
[src]
fn from_u8(n: u8) -> Option<Self>
[src]Converts an u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
fn from_u16(n: u16) -> Option<Self>
[src]
fn from_u16(n: u16) -> Option<Self>
[src]Converts an u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
fn from_u32(n: u32) -> Option<Self>
[src]
fn from_u32(n: u32) -> Option<Self>
[src]Converts an u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
fn from_f32(n: f32) -> Option<Self>
[src]
fn from_f32(n: f32) -> Option<Self>
[src]Converts a f32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
fn from_f64(n: f64) -> Option<Self>
[src]
fn from_f64(n: f64) -> Option<Self>
[src]Converts a f64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
impl<Fract: LeEqU16> MulAssign<FixedI16<Fract>> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> MulAssign<FixedI16<Fract>> for FixedI16<Fract>
[src]fn mul_assign(&mut self, rhs: Self)
[src]
fn mul_assign(&mut self, rhs: Self)
[src]Performs the *=
operation. Read more
impl<Fract: LeEqU16> MulAssign<i16> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> MulAssign<i16> for FixedI16<Fract>
[src]fn mul_assign(&mut self, rhs: i16)
[src]
fn mul_assign(&mut self, rhs: i16)
[src]Performs the *=
operation. Read more
impl<Fract: LeEqU16> Num for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> Num for FixedI16<Fract>
[src]type FromStrRadixErr = ()
fn from_str_radix(
_str: &str,
_radix: u32
) -> Result<Self, Self::FromStrRadixErr>
[src]
fn from_str_radix(
_str: &str,
_radix: u32
) -> Result<Self, Self::FromStrRadixErr>
[src]Convert from a string and radix (typically 2..=36
). Read more
impl<Fract: LeEqU16> Ord for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> Ord for FixedI16<Fract>
[src]impl<Fract: LeEqU16> PartialOrd<FixedI16<Fract>> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> PartialOrd<FixedI16<Fract>> for FixedI16<Fract>
[src]fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<Fract: Send + Sync + 'static> RealField for FixedI16<Fract> where
Fract: Unsigned + LeEqU16 + IsLessOrEqual<U15, Output = True> + IsLessOrEqual<U14, Output = True> + IsLessOrEqual<U13, Output = True> + IsLessOrEqual<U12, Output = True>,
[src]
impl<Fract: Send + Sync + 'static> RealField for FixedI16<Fract> where
Fract: Unsigned + LeEqU16 + IsLessOrEqual<U15, Output = True> + IsLessOrEqual<U14, Output = True> + IsLessOrEqual<U13, Output = True> + IsLessOrEqual<U12, Output = True>,
[src]fn frac_2_sqrt_pi() -> Self
[src]
fn frac_2_sqrt_pi() -> Self
[src]2.0 / sqrt(pi).
fn is_sign_positive(self) -> bool
[src]
fn is_sign_positive(self) -> bool
[src]Is the sign of this real number positive?
fn is_sign_negative(self) -> bool
[src]
fn is_sign_negative(self) -> bool
[src]Is the sign of this real number negative?
fn max(self, other: Self) -> Self
[src]
fn min(self, other: Self) -> Self
[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
fn atan2(self, other: Self) -> Self
[src]
impl<Fract: LeEqU16> RelativeEq<FixedI16<Fract>> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> RelativeEq<FixedI16<Fract>> for FixedI16<Fract>
[src]fn default_max_relative() -> Self::Epsilon
[src]
fn default_max_relative() -> Self::Epsilon
[src]The default relative tolerance for testing values that are far-apart. Read more
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]A test for equality that uses a relative comparison if the values are far apart.
fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]The inverse of RelativeEq::relative_eq
.
impl<Fract: LeEqU16> RemAssign<FixedI16<Fract>> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> RemAssign<FixedI16<Fract>> for FixedI16<Fract>
[src]fn rem_assign(&mut self, rhs: Self)
[src]
fn rem_assign(&mut self, rhs: Self)
[src]Performs the %=
operation. Read more
impl<Fract: LeEqU16> RemAssign<i16> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> RemAssign<i16> for FixedI16<Fract>
[src]fn rem_assign(&mut self, rhs: i16)
[src]
fn rem_assign(&mut self, rhs: i16)
[src]Performs the %=
operation. Read more
impl<Fract: LeEqU16> Signed for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> Signed for FixedI16<Fract>
[src]fn is_positive(&self) -> bool
[src]
fn is_positive(&self) -> bool
[src]Returns true if the number is positive and false if the number is zero or negative.
fn is_negative(&self) -> bool
[src]
fn is_negative(&self) -> bool
[src]Returns true if the number is negative and false if the number is zero or positive.
impl<Fract: LeEqU16> SimdValue for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> SimdValue for FixedI16<Fract>
[src]type Element = Self
type Element = Self
The type of the elements of each lane of this SIMD value.
unsafe fn extract_unchecked(&self, _: usize) -> Self::Element
[src]
unsafe fn extract_unchecked(&self, _: usize) -> Self::Element
[src]Extracts the i-th lane of self
without bound-checking.
fn replace(&mut self, _: usize, val: Self::Element)
[src]
fn replace(&mut self, _: usize, val: Self::Element)
[src]Replaces the i-th lane of self
by val
. Read more
unsafe fn replace_unchecked(&mut self, _: usize, val: Self::Element)
[src]
unsafe fn replace_unchecked(&mut self, _: usize, val: Self::Element)
[src]Replaces the i-th lane of self
by val
without bound-checking.
fn select(self, cond: Self::SimdBool, other: Self) -> Self
[src]
fn select(self, cond: Self::SimdBool, other: Self) -> Self
[src]Merges self
and other
depending on the lanes of cond
. Read more
impl<Fract: LeEqU16> SubAssign<FixedI16<Fract>> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> SubAssign<FixedI16<Fract>> for FixedI16<Fract>
[src]fn sub_assign(&mut self, rhs: Self)
[src]
fn sub_assign(&mut self, rhs: Self)
[src]Performs the -=
operation. Read more
impl<Fract: LeEqU16> SubsetOf<FixedI16<Fract>> for f64
[src]
impl<Fract: LeEqU16> SubsetOf<FixedI16<Fract>> for f64
[src]fn to_superset(&self) -> FixedI16<Fract>
[src]
fn to_superset(&self) -> FixedI16<Fract>
[src]The inclusion map: converts self
to the equivalent element of its superset.
fn from_superset(element: &FixedI16<Fract>) -> Option<Self>
[src]
fn from_superset(element: &FixedI16<Fract>) -> Option<Self>
[src]The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn from_superset_unchecked(element: &FixedI16<Fract>) -> Self
[src]
fn from_superset_unchecked(element: &FixedI16<Fract>) -> Self
[src]Use with care! Same as self.to_superset
but without any property checks. Always succeeds.
fn is_in_subset(_: &FixedI16<Fract>) -> bool
[src]
fn is_in_subset(_: &FixedI16<Fract>) -> bool
[src]Checks if element
is actually part of the subset Self
(and can be converted to it).
impl<Fract: LeEqU16> SubsetOf<FixedI16<Fract>> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> SubsetOf<FixedI16<Fract>> for FixedI16<Fract>
[src]fn to_superset(&self) -> FixedI16<Fract>
[src]
fn to_superset(&self) -> FixedI16<Fract>
[src]The inclusion map: converts self
to the equivalent element of its superset.
fn from_superset(element: &FixedI16<Fract>) -> Option<Self>
[src]
fn from_superset(element: &FixedI16<Fract>) -> Option<Self>
[src]The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn from_superset_unchecked(element: &FixedI16<Fract>) -> Self
[src]
fn from_superset_unchecked(element: &FixedI16<Fract>) -> Self
[src]Use with care! Same as self.to_superset
but without any property checks. Always succeeds.
fn is_in_subset(_: &FixedI16<Fract>) -> bool
[src]
fn is_in_subset(_: &FixedI16<Fract>) -> bool
[src]Checks if element
is actually part of the subset Self
(and can be converted to it).
impl<Fract: LeEqU16> UlpsEq<FixedI16<Fract>> for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> UlpsEq<FixedI16<Fract>> for FixedI16<Fract>
[src]impl<Fract: Copy> Copy for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> Eq for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> Field for FixedI16<Fract>
[src]
impl<Fract: LeEqU16> PrimitiveSimdValue for FixedI16<Fract>
[src]
Auto Trait Implementations
impl<Fract> RefUnwindSafe for FixedI16<Fract> where
Fract: RefUnwindSafe,
Fract: RefUnwindSafe,
impl<Fract> Send for FixedI16<Fract> where
Fract: Send,
Fract: Send,
impl<Fract> Sync for FixedI16<Fract> where
Fract: Sync,
Fract: Sync,
impl<Fract> Unpin for FixedI16<Fract> where
Fract: Unpin,
Fract: Unpin,
impl<Fract> UnwindSafe for FixedI16<Fract> where
Fract: UnwindSafe,
Fract: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> CheckedAs for T
[src]
impl<T> CheckedAs for T
[src]pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]
pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]Casts the value.
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]pub fn lossless_try_into(self) -> Option<Dst>
[src]
pub fn lossless_try_into(self) -> Option<Dst>
[src]Performs the conversion.
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]pub fn lossy_into(self) -> Dst
[src]
pub fn lossy_into(self) -> Dst
[src]Performs the conversion.
impl<T> OverflowingAs for T
[src]
impl<T> OverflowingAs for T
[src]pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]
pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]Casts the value.
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> SaturatingAs for T
[src]
impl<T> SaturatingAs for T
[src]pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]
pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]Casts the value.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> UnwrappedAs for T
[src]
impl<T> UnwrappedAs for T
[src]pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
[src]
pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
[src]Casts the value.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WrappingAs for T
[src]
impl<T> WrappingAs for T
[src]pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]
pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]Casts the value.
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> NumAssign for T where
T: Num + NumAssignOps<T>,
[src]
T: Num + NumAssignOps<T>,
impl<T, Rhs> NumAssignOps<Rhs> for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
[src]
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,