pub struct FSize {
pub width: f32,
pub height: f32,
}Expand description
A struct representing a floating-point
Size
determined by its width and height values.
Fields§
§width: f32The width value the Size is currently representing.
height: f32The height value the Size is currently representing.
Implementations§
Source§impl FSize
impl FSize
Sourcepub fn round(self) -> Size
pub fn round(self) -> Size
Returns a non-floating point Size where the decimal parts of the width and height have been rounded.
Sourcepub fn round_u(self) -> USize
pub fn round_u(self) -> USize
Returns a non-floating point Size where the decimal parts of the width and height have been rounded.
§Panics
If the width or the height is < 0.
Trait Implementations§
Source§impl AddAssign<f32> for FSize
impl AddAssign<f32> for FSize
Source§fn add_assign(&mut self, rhs: f32)
fn add_assign(&mut self, rhs: f32)
Performs the
+= operation. Read moreSource§impl DivAssign<f32> for FSize
impl DivAssign<f32> for FSize
Source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the
/= operation. Read moreSource§impl MulAssign<f32> for FSize
impl MulAssign<f32> for FSize
Source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*= operation. Read moreSource§impl RemAssign<f32> for FSize
impl RemAssign<f32> for FSize
Source§fn rem_assign(&mut self, rhs: f32)
fn rem_assign(&mut self, rhs: f32)
Performs the
%= operation. Read moreSource§impl SubAssign<f32> for FSize
impl SubAssign<f32> for FSize
Source§fn sub_assign(&mut self, rhs: f32)
fn sub_assign(&mut self, rhs: f32)
Performs the
-= operation. Read moreimpl Copy for FSize
impl StructuralPartialEq for FSize
Auto Trait Implementations§
impl Freeze for FSize
impl RefUnwindSafe for FSize
impl Send for FSize
impl Sync for FSize
impl Unpin for FSize
impl UnwindSafe for FSize
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