Type Alias de_uom::units::LogicalPixel
source · pub type LogicalPixel = Quantity<PIXEL>;
Aliased Type§
struct LogicalPixel(pub(crate) f32);
Fields§
§0: f32
Implementations
source§impl Quantity<DIMENSIONLESS>
impl Quantity<DIMENSIONLESS>
sourcepub fn normalized(&self) -> Self
pub fn normalized(&self) -> Self
Returns a new angle normalized to a values between 0.0 (inclusive) and the full circle constant τ (exclusive).
source§impl<const U: i32> Quantity<U>
impl<const U: i32> Quantity<U>
pub const ZERO: Self = _
pub const ONE: Self = _
sourcepub const fn new_unchecked(value: f32) -> Self
pub const fn new_unchecked(value: f32) -> Self
Creates a new quantity without checking the value.
It is expected that the value is not a NaN. If NaN is given, the type might behave strangely or panic during some of the operations.
pub const fn inner(&self) -> f32
Trait Implementations
source§impl<const U: i32> AddAssign for Quantity<U>
impl<const U: i32> AddAssign for Quantity<U>
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl<const U: i32> DivAssign<f32> for Quantity<U>
impl<const U: i32> DivAssign<f32> for Quantity<U>
source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the
/=
operation. Read moresource§impl<const U: i32> MulAssign<f32> for Quantity<U>
impl<const U: i32> MulAssign<f32> for Quantity<U>
source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*=
operation. Read moresource§impl<const U: i32> Ord for Quantity<U>
impl<const U: i32> Ord for Quantity<U>
source§impl<const U: i32> PartialEq for Quantity<U>
impl<const U: i32> PartialEq for Quantity<U>
source§impl<const U: i32> PartialOrd for Quantity<U>
impl<const U: i32> PartialOrd for Quantity<U>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<const U: i32> SubAssign for Quantity<U>
impl<const U: i32> SubAssign for Quantity<U>
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read more