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