pub struct Unorm32(/* private fields */);
Implementations§
Source§impl Unorm32
impl Unorm32
pub const fn from_inner(inner: u32) -> Self
pub const fn zero() -> Self
pub const fn one() -> Self
pub const fn min_value() -> Self
pub const fn max_value() -> Self
pub const fn epsilon() -> Self
pub fn from_denominator(denominator: u32) -> Self
pub fn try_from_float<F: Float>(f: F) -> Result<Self, FloatToUnormError<F>>
pub fn from_float<F: Float>(f: F) -> Self
pub fn from_float_clamped<F: Float>(f: F) -> Self
pub const fn to_inner(self) -> u32
pub fn to_float<F: Float>(self) -> F
pub fn saturating_add(self, other: Self) -> Self
pub fn saturating_mul(self, other: Self) -> Self
pub fn saturating_pow(self, other: u32) -> Self
pub fn saturating_sub(self, other: Self) -> Self
pub fn wrapping_add(self, other: Self) -> Self
pub fn wrapping_div(self, other: Self) -> Self
pub fn wrapping_mul(self, other: Self) -> Self
pub fn wrapping_neg(self) -> Self
pub fn wrapping_pow(self, other: u32) -> Self
pub fn wrapping_rem(self, other: Self) -> Self
pub fn wrapping_shl(self, other: u32) -> Self
pub fn wrapping_shr(self, other: u32) -> Self
pub fn wrapping_sub(self, other: Self) -> Self
Trait Implementations§
Source§impl AddAssign<&Unorm32> for Unorm32
impl AddAssign<&Unorm32> for Unorm32
Source§fn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the
+=
operation. Read moreSource§impl AddAssign for Unorm32
impl AddAssign for Unorm32
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moreSource§impl DivAssign<&Unorm32> for Unorm32
impl DivAssign<&Unorm32> for Unorm32
Source§fn div_assign(&mut self, other: &Self)
fn div_assign(&mut self, other: &Self)
Performs the
/=
operation. Read moreSource§impl DivAssign for Unorm32
impl DivAssign for Unorm32
Source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/=
operation. Read moreSource§impl MulAssign<&Unorm32> for Unorm32
impl MulAssign<&Unorm32> for Unorm32
Source§fn mul_assign(&mut self, other: &Self)
fn mul_assign(&mut self, other: &Self)
Performs the
*=
operation. Read moreSource§impl MulAssign for Unorm32
impl MulAssign for Unorm32
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moreSource§impl Num for Unorm32
impl Num for Unorm32
type FromStrRadixErr = <u32 as Num>::FromStrRadixErr
Source§fn from_str_radix(s: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
fn from_str_radix(s: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
Convert from a string and radix (typically
2..=36
). Read moreSource§impl Ord for Unorm32
impl Ord for Unorm32
Source§impl PartialOrd for Unorm32
impl PartialOrd for Unorm32
Source§impl RemAssign<&Unorm32> for Unorm32
impl RemAssign<&Unorm32> for Unorm32
Source§fn rem_assign(&mut self, other: &Self)
fn rem_assign(&mut self, other: &Self)
Performs the
%=
operation. Read moreSource§impl RemAssign for Unorm32
impl RemAssign for Unorm32
Source§fn rem_assign(&mut self, other: Self)
fn rem_assign(&mut self, other: Self)
Performs the
%=
operation. Read moreSource§impl SubAssign<&Unorm32> for Unorm32
impl SubAssign<&Unorm32> for Unorm32
Source§fn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Performs the
-=
operation. Read moreSource§impl SubAssign for Unorm32
impl SubAssign for Unorm32
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreSource§impl ToPrimitive for Unorm32
impl ToPrimitive for Unorm32
Source§fn to_i64(&self) -> Option<i64>
fn to_i64(&self) -> Option<i64>
Converts the value of
self
to an i64
. If the value cannot be
represented by an i64
, then None
is returned.Source§fn to_u64(&self) -> Option<u64>
fn to_u64(&self) -> Option<u64>
Converts the value of
self
to a u64
. If the value cannot be
represented by a u64
, then None
is returned.Source§fn to_isize(&self) -> Option<isize>
fn to_isize(&self) -> Option<isize>
Converts the value of
self
to an isize
. If the value cannot be
represented by an isize
, then None
is returned.Source§fn to_i8(&self) -> Option<i8>
fn to_i8(&self) -> Option<i8>
Converts the value of
self
to an i8
. If the value cannot be
represented by an i8
, then None
is returned.Source§fn to_i16(&self) -> Option<i16>
fn to_i16(&self) -> Option<i16>
Converts the value of
self
to an i16
. If the value cannot be
represented by an i16
, then None
is returned.Source§fn to_i32(&self) -> Option<i32>
fn to_i32(&self) -> Option<i32>
Converts the value of
self
to an i32
. If the value cannot be
represented by an i32
, then None
is returned.Source§fn to_i128(&self) -> Option<i128>
fn to_i128(&self) -> Option<i128>
Converts the value of
self
to an i128
. If the value cannot be
represented by an i128
(i64
under the default implementation), then
None
is returned. Read moreSource§fn to_usize(&self) -> Option<usize>
fn to_usize(&self) -> Option<usize>
Converts the value of
self
to a usize
. If the value cannot be
represented by a usize
, then None
is returned.Source§fn to_u8(&self) -> Option<u8>
fn to_u8(&self) -> Option<u8>
Converts the value of
self
to a u8
. If the value cannot be
represented by a u8
, then None
is returned.Source§fn to_u16(&self) -> Option<u16>
fn to_u16(&self) -> Option<u16>
Converts the value of
self
to a u16
. If the value cannot be
represented by a u16
, then None
is returned.Source§fn to_u32(&self) -> Option<u32>
fn to_u32(&self) -> Option<u32>
Converts the value of
self
to a u32
. If the value cannot be
represented by a u32
, then None
is returned.Source§fn to_u128(&self) -> Option<u128>
fn to_u128(&self) -> Option<u128>
Converts the value of
self
to a u128
. If the value cannot be
represented by a u128
(u64
under the default implementation), then
None
is returned. Read moreimpl Copy for Unorm32
impl Eq for Unorm32
impl StructuralPartialEq for Unorm32
impl Unsigned for Unorm32
Auto Trait Implementations§
impl Freeze for Unorm32
impl RefUnwindSafe for Unorm32
impl Send for Unorm32
impl Sync for Unorm32
impl Unpin for Unorm32
impl UnwindSafe for Unorm32
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