#[repr(transparent)]pub struct UNorm8(pub u8);Expand description
An 8-bit fixed point value in the range [0.0..=1.0] (inclusive).
Basic arithmetic operations are implemented. Multiplication of two
UNorm8 is always defined. However, addition, subtraction, and
division can very easily overflow or underflow, so be careful!
Tuple Fields§
§0: u8Implementations§
Trait Implementations§
Source§impl AddAssign for UNorm8
impl AddAssign for UNorm8
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl DivAssign for UNorm8
impl DivAssign for UNorm8
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl MulAssign for UNorm8
impl MulAssign for UNorm8
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl Ord for UNorm8
impl Ord for UNorm8
Source§impl PartialOrd for UNorm8
impl PartialOrd for UNorm8
Source§impl SubAssign for UNorm8
impl SubAssign for UNorm8
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for UNorm8
impl Eq for UNorm8
impl StructuralPartialEq for UNorm8
Auto Trait Implementations§
impl Freeze for UNorm8
impl RefUnwindSafe for UNorm8
impl Send for UNorm8
impl Sync for UNorm8
impl Unpin for UNorm8
impl UnwindSafe for UNorm8
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