Struct pixels_graphics_lib::math::UPoint
source · [−]Fields
x: usize
y: usize
Implementations
Trait Implementations
sourceimpl ClampXy<(u16, u16)> for UPoint
impl ClampXy<(u16, u16)> for UPoint
sourcefn clamp_xy(&self, min: (u16, u16), max: (u16, u16)) -> Self
fn clamp_xy(&self, min: (u16, u16), max: (u16, u16)) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl ClampXy<(u32, u32)> for UPoint
impl ClampXy<(u32, u32)> for UPoint
sourcefn clamp_xy(&self, min: (u32, u32), max: (u32, u32)) -> Self
fn clamp_xy(&self, min: (u32, u32), max: (u32, u32)) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl ClampXy<(u64, u64)> for UPoint
impl ClampXy<(u64, u64)> for UPoint
sourcefn clamp_xy(&self, min: (u64, u64), max: (u64, u64)) -> Self
fn clamp_xy(&self, min: (u64, u64), max: (u64, u64)) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl ClampXy<(u8, u8)> for UPoint
impl ClampXy<(u8, u8)> for UPoint
sourcefn clamp_xy(&self, min: (u8, u8), max: (u8, u8)) -> Self
fn clamp_xy(&self, min: (u8, u8), max: (u8, u8)) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl ClampXy<(usize, usize)> for UPoint
impl ClampXy<(usize, usize)> for UPoint
sourcefn clamp_xy(&self, min: (usize, usize), max: (usize, usize)) -> Self
fn clamp_xy(&self, min: (usize, usize), max: (usize, usize)) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl ClampXy<UPoint> for Point
impl ClampXy<UPoint> for Point
sourcefn clamp_xy(&self, min: UPoint, max: UPoint) -> Self
fn clamp_xy(&self, min: UPoint, max: UPoint) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl ClampXy<UPoint> for UPoint
impl ClampXy<UPoint> for UPoint
sourcefn clamp_xy(&self, min: UPoint, max: UPoint) -> Self
fn clamp_xy(&self, min: UPoint, max: UPoint) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl ClampXy<u16> for UPoint
impl ClampXy<u16> for UPoint
sourcefn clamp_xy(&self, min: u16, max: u16) -> Self
fn clamp_xy(&self, min: u16, max: u16) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl ClampXy<u32> for UPoint
impl ClampXy<u32> for UPoint
sourcefn clamp_xy(&self, min: u32, max: u32) -> Self
fn clamp_xy(&self, min: u32, max: u32) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl ClampXy<u64> for UPoint
impl ClampXy<u64> for UPoint
sourcefn clamp_xy(&self, min: u64, max: u64) -> Self
fn clamp_xy(&self, min: u64, max: u64) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl ClampXy<u8> for UPoint
impl ClampXy<u8> for UPoint
sourcefn clamp_xy(&self, min: u8, max: u8) -> Self
fn clamp_xy(&self, min: u8, max: u8) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl ClampXy<usize> for UPoint
impl ClampXy<usize> for UPoint
sourcefn clamp_xy(&self, min: usize, max: usize) -> Self
fn clamp_xy(&self, min: usize, max: usize) -> Self
Return self.x and self.y clamped between min and max (both inclusive)
min and max can be primitives (such as usize) or structs with x and y fields (such as Point)
If they are primitive then both self.x
and self.y
will be clamped using the same value otherwise
self.x
will only clamped by min.x
and max.x
and the same for y
Read more
sourceimpl<'de> Deserialize<'de> for UPoint
impl<'de> Deserialize<'de> for UPoint
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl MaxXy<(u16, u16)> for UPoint
impl MaxXy<(u16, u16)> for UPoint
sourcefn max_xy(&self, value: (u16, u16)) -> Self
fn max_xy(&self, value: (u16, u16)) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MaxXy<(u32, u32)> for UPoint
impl MaxXy<(u32, u32)> for UPoint
sourcefn max_xy(&self, value: (u32, u32)) -> Self
fn max_xy(&self, value: (u32, u32)) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MaxXy<(u64, u64)> for UPoint
impl MaxXy<(u64, u64)> for UPoint
sourcefn max_xy(&self, value: (u64, u64)) -> Self
fn max_xy(&self, value: (u64, u64)) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MaxXy<(u8, u8)> for UPoint
impl MaxXy<(u8, u8)> for UPoint
sourcefn max_xy(&self, value: (u8, u8)) -> Self
fn max_xy(&self, value: (u8, u8)) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MaxXy<(usize, usize)> for UPoint
impl MaxXy<(usize, usize)> for UPoint
sourcefn max_xy(&self, value: (usize, usize)) -> Self
fn max_xy(&self, value: (usize, usize)) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MaxXy<UPoint> for Point
impl MaxXy<UPoint> for Point
sourcefn max_xy(&self, value: UPoint) -> Self
fn max_xy(&self, value: UPoint) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MaxXy<UPoint> for UPoint
impl MaxXy<UPoint> for UPoint
sourcefn max_xy(&self, value: UPoint) -> Self
fn max_xy(&self, value: UPoint) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MaxXy<u16> for UPoint
impl MaxXy<u16> for UPoint
sourcefn max_xy(&self, value: u16) -> Self
fn max_xy(&self, value: u16) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MaxXy<u32> for UPoint
impl MaxXy<u32> for UPoint
sourcefn max_xy(&self, value: u32) -> Self
fn max_xy(&self, value: u32) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MaxXy<u64> for UPoint
impl MaxXy<u64> for UPoint
sourcefn max_xy(&self, value: u64) -> Self
fn max_xy(&self, value: u64) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MaxXy<u8> for UPoint
impl MaxXy<u8> for UPoint
sourcefn max_xy(&self, value: u8) -> Self
fn max_xy(&self, value: u8) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MaxXy<usize> for UPoint
impl MaxXy<usize> for UPoint
sourcefn max_xy(&self, value: usize) -> Self
fn max_xy(&self, value: usize) -> Self
Return self.x.max(value) and self.y.max(value)
as opposed to max which returns the highest out of self or value
If value is primitive then both self.x
and self.y
will be max’d using the same value otherwise
self.x
will only max’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<(u16, u16)> for UPoint
impl MinXy<(u16, u16)> for UPoint
sourcefn min_xy(&self, value: (u16, u16)) -> Self
fn min_xy(&self, value: (u16, u16)) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<(u32, u32)> for UPoint
impl MinXy<(u32, u32)> for UPoint
sourcefn min_xy(&self, value: (u32, u32)) -> Self
fn min_xy(&self, value: (u32, u32)) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<(u64, u64)> for UPoint
impl MinXy<(u64, u64)> for UPoint
sourcefn min_xy(&self, value: (u64, u64)) -> Self
fn min_xy(&self, value: (u64, u64)) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<(u8, u8)> for UPoint
impl MinXy<(u8, u8)> for UPoint
sourcefn min_xy(&self, value: (u8, u8)) -> Self
fn min_xy(&self, value: (u8, u8)) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<(usize, usize)> for UPoint
impl MinXy<(usize, usize)> for UPoint
sourcefn min_xy(&self, value: (usize, usize)) -> Self
fn min_xy(&self, value: (usize, usize)) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<UPoint> for Point
impl MinXy<UPoint> for Point
sourcefn min_xy(&self, value: UPoint) -> Self
fn min_xy(&self, value: UPoint) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<UPoint> for UPoint
impl MinXy<UPoint> for UPoint
sourcefn min_xy(&self, value: UPoint) -> Self
fn min_xy(&self, value: UPoint) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<u16> for UPoint
impl MinXy<u16> for UPoint
sourcefn min_xy(&self, value: u16) -> Self
fn min_xy(&self, value: u16) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<u32> for UPoint
impl MinXy<u32> for UPoint
sourcefn min_xy(&self, value: u32) -> Self
fn min_xy(&self, value: u32) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<u64> for UPoint
impl MinXy<u64> for UPoint
sourcefn min_xy(&self, value: u64) -> Self
fn min_xy(&self, value: u64) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<u8> for UPoint
impl MinXy<u8> for UPoint
sourcefn min_xy(&self, value: u8) -> Self
fn min_xy(&self, value: u8) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl MinXy<usize> for UPoint
impl MinXy<usize> for UPoint
sourcefn min_xy(&self, value: usize) -> Self
fn min_xy(&self, value: usize) -> Self
Return self.x.min(value) and self.y.min(value)
as opposed to min which returns the lowest out of self or value
If value is primitive then both self.x
and self.y
will be min’d using the same value otherwise
self.x
will only min’d by min.x
and max.x
and the same for y
Read more
sourceimpl Ord for UPoint
impl Ord for UPoint
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<UPoint> for UPoint
impl PartialEq<UPoint> for UPoint
sourceimpl PartialOrd<UPoint> for UPoint
impl PartialOrd<UPoint> for UPoint
sourcefn partial_cmp(&self, other: &UPoint) -> Option<Ordering>
fn partial_cmp(&self, other: &UPoint) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl SimpleMath for UPoint
impl SimpleMath for UPoint
impl Copy for UPoint
impl Eq for UPoint
impl StructuralEq for UPoint
impl StructuralPartialEq for UPoint
Auto Trait Implementations
impl RefUnwindSafe for UPoint
impl Send for UPoint
impl Sync for UPoint
impl Unpin for UPoint
impl UnwindSafe for UPoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian()
.
sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian()
.
sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian()
.