pub struct Position {
pub x: f32,
pub y: f32,
}
Expand description
Represents a generic 2D position.
Fields§
§x: f32
The x component of the position, in pixels.
y: f32
The y component of the position, in pixels.
Implementations§
Trait Implementations§
Source§impl AddAssign for Position
impl AddAssign for Position
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moreSource§impl DivAssign<f32> for Position
impl DivAssign<f32> for Position
Source§fn div_assign(&mut self, other: f32)
fn div_assign(&mut self, other: f32)
Performs the
/=
operation. Read moreSource§impl DivAssign<f64> for Position
impl DivAssign<f64> for Position
Source§fn div_assign(&mut self, other: f64)
fn div_assign(&mut self, other: f64)
Performs the
/=
operation. Read moreSource§impl DivAssign<i128> for Position
impl DivAssign<i128> for Position
Source§fn div_assign(&mut self, other: i128)
fn div_assign(&mut self, other: i128)
Performs the
/=
operation. Read moreSource§impl DivAssign<i16> for Position
impl DivAssign<i16> for Position
Source§fn div_assign(&mut self, other: i16)
fn div_assign(&mut self, other: i16)
Performs the
/=
operation. Read moreSource§impl DivAssign<i32> for Position
impl DivAssign<i32> for Position
Source§fn div_assign(&mut self, other: i32)
fn div_assign(&mut self, other: i32)
Performs the
/=
operation. Read moreSource§impl DivAssign<i64> for Position
impl DivAssign<i64> for Position
Source§fn div_assign(&mut self, other: i64)
fn div_assign(&mut self, other: i64)
Performs the
/=
operation. Read moreSource§impl DivAssign<i8> for Position
impl DivAssign<i8> for Position
Source§fn div_assign(&mut self, other: i8)
fn div_assign(&mut self, other: i8)
Performs the
/=
operation. Read moreSource§impl DivAssign<isize> for Position
impl DivAssign<isize> for Position
Source§fn div_assign(&mut self, other: isize)
fn div_assign(&mut self, other: isize)
Performs the
/=
operation. Read moreSource§impl DivAssign<u128> for Position
impl DivAssign<u128> for Position
Source§fn div_assign(&mut self, other: u128)
fn div_assign(&mut self, other: u128)
Performs the
/=
operation. Read moreSource§impl DivAssign<u16> for Position
impl DivAssign<u16> for Position
Source§fn div_assign(&mut self, other: u16)
fn div_assign(&mut self, other: u16)
Performs the
/=
operation. Read moreSource§impl DivAssign<u32> for Position
impl DivAssign<u32> for Position
Source§fn div_assign(&mut self, other: u32)
fn div_assign(&mut self, other: u32)
Performs the
/=
operation. Read moreSource§impl DivAssign<u64> for Position
impl DivAssign<u64> for Position
Source§fn div_assign(&mut self, other: u64)
fn div_assign(&mut self, other: u64)
Performs the
/=
operation. Read moreSource§impl DivAssign<u8> for Position
impl DivAssign<u8> for Position
Source§fn div_assign(&mut self, other: u8)
fn div_assign(&mut self, other: u8)
Performs the
/=
operation. Read moreSource§impl DivAssign<usize> for Position
impl DivAssign<usize> for Position
Source§fn div_assign(&mut self, other: usize)
fn div_assign(&mut self, other: usize)
Performs the
/=
operation. Read moreSource§impl DivAssign for Position
impl DivAssign for Position
Source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/=
operation. Read moreSource§impl MulAssign<f32> for Position
impl MulAssign<f32> for Position
Source§fn mul_assign(&mut self, other: f32)
fn mul_assign(&mut self, other: f32)
Performs the
*=
operation. Read moreSource§impl MulAssign<f64> for Position
impl MulAssign<f64> for Position
Source§fn mul_assign(&mut self, other: f64)
fn mul_assign(&mut self, other: f64)
Performs the
*=
operation. Read moreSource§impl MulAssign<i128> for Position
impl MulAssign<i128> for Position
Source§fn mul_assign(&mut self, other: i128)
fn mul_assign(&mut self, other: i128)
Performs the
*=
operation. Read moreSource§impl MulAssign<i16> for Position
impl MulAssign<i16> for Position
Source§fn mul_assign(&mut self, other: i16)
fn mul_assign(&mut self, other: i16)
Performs the
*=
operation. Read moreSource§impl MulAssign<i32> for Position
impl MulAssign<i32> for Position
Source§fn mul_assign(&mut self, other: i32)
fn mul_assign(&mut self, other: i32)
Performs the
*=
operation. Read moreSource§impl MulAssign<i64> for Position
impl MulAssign<i64> for Position
Source§fn mul_assign(&mut self, other: i64)
fn mul_assign(&mut self, other: i64)
Performs the
*=
operation. Read moreSource§impl MulAssign<i8> for Position
impl MulAssign<i8> for Position
Source§fn mul_assign(&mut self, other: i8)
fn mul_assign(&mut self, other: i8)
Performs the
*=
operation. Read moreSource§impl MulAssign<isize> for Position
impl MulAssign<isize> for Position
Source§fn mul_assign(&mut self, other: isize)
fn mul_assign(&mut self, other: isize)
Performs the
*=
operation. Read moreSource§impl MulAssign<u128> for Position
impl MulAssign<u128> for Position
Source§fn mul_assign(&mut self, other: u128)
fn mul_assign(&mut self, other: u128)
Performs the
*=
operation. Read moreSource§impl MulAssign<u16> for Position
impl MulAssign<u16> for Position
Source§fn mul_assign(&mut self, other: u16)
fn mul_assign(&mut self, other: u16)
Performs the
*=
operation. Read moreSource§impl MulAssign<u32> for Position
impl MulAssign<u32> for Position
Source§fn mul_assign(&mut self, other: u32)
fn mul_assign(&mut self, other: u32)
Performs the
*=
operation. Read moreSource§impl MulAssign<u64> for Position
impl MulAssign<u64> for Position
Source§fn mul_assign(&mut self, other: u64)
fn mul_assign(&mut self, other: u64)
Performs the
*=
operation. Read moreSource§impl MulAssign<u8> for Position
impl MulAssign<u8> for Position
Source§fn mul_assign(&mut self, other: u8)
fn mul_assign(&mut self, other: u8)
Performs the
*=
operation. Read moreSource§impl MulAssign<usize> for Position
impl MulAssign<usize> for Position
Source§fn mul_assign(&mut self, other: usize)
fn mul_assign(&mut self, other: usize)
Performs the
*=
operation. Read moreSource§impl MulAssign for Position
impl MulAssign for Position
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moreSource§impl SubAssign for Position
impl SubAssign for Position
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreimpl Copy for Position
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)