Struct pixels_graphics_lib::math::Point
source · [−]Fields
x: isize
y: isize
Implementations
sourceimpl Point
impl Point
pub const fn is_positive(&self) -> bool
Trait Implementations
sourceimpl ClampXy<(i16, i16)> for Point
impl ClampXy<(i16, i16)> for Point
sourcefn clamp_xy(&self, min: (i16, i16), max: (i16, i16)) -> Self
fn clamp_xy(&self, min: (i16, i16), max: (i16, i16)) -> 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<(i32, i32)> for Point
impl ClampXy<(i32, i32)> for Point
sourcefn clamp_xy(&self, min: (i32, i32), max: (i32, i32)) -> Self
fn clamp_xy(&self, min: (i32, i32), max: (i32, i32)) -> 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<(i64, i64)> for Point
impl ClampXy<(i64, i64)> for Point
sourcefn clamp_xy(&self, min: (i64, i64), max: (i64, i64)) -> Self
fn clamp_xy(&self, min: (i64, i64), max: (i64, i64)) -> 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<(i8, i8)> for Point
impl ClampXy<(i8, i8)> for Point
sourcefn clamp_xy(&self, min: (i8, i8), max: (i8, i8)) -> Self
fn clamp_xy(&self, min: (i8, i8), max: (i8, i8)) -> 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<(isize, isize)> for Point
impl ClampXy<(isize, isize)> for Point
sourcefn clamp_xy(&self, min: (isize, isize), max: (isize, isize)) -> Self
fn clamp_xy(&self, min: (isize, isize), max: (isize, isize)) -> 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, u16)> for Point
impl ClampXy<(u16, u16)> for Point
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 Point
impl ClampXy<(u32, u32)> for Point
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 Point
impl ClampXy<(u64, u64)> for Point
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 Point
impl ClampXy<(u8, u8)> for Point
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 Point
impl ClampXy<(usize, usize)> for Point
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<Point> for Point
impl ClampXy<Point> for Point
sourcefn clamp_xy(&self, min: Point, max: Point) -> Self
fn clamp_xy(&self, min: Point, max: Point) -> 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<i16> for Point
impl ClampXy<i16> for Point
sourcefn clamp_xy(&self, min: i16, max: i16) -> Self
fn clamp_xy(&self, min: i16, max: i16) -> 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<i32> for Point
impl ClampXy<i32> for Point
sourcefn clamp_xy(&self, min: i32, max: i32) -> Self
fn clamp_xy(&self, min: i32, max: i32) -> 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<i64> for Point
impl ClampXy<i64> for Point
sourcefn clamp_xy(&self, min: i64, max: i64) -> Self
fn clamp_xy(&self, min: i64, max: i64) -> 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<i8> for Point
impl ClampXy<i8> for Point
sourcefn clamp_xy(&self, min: i8, max: i8) -> Self
fn clamp_xy(&self, min: i8, max: i8) -> 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<isize> for Point
impl ClampXy<isize> for Point
sourcefn clamp_xy(&self, min: isize, max: isize) -> Self
fn clamp_xy(&self, min: isize, max: isize) -> 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 Point
impl ClampXy<u16> for Point
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 Point
impl ClampXy<u32> for Point
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 Point
impl ClampXy<u64> for Point
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 Point
impl ClampXy<u8> for Point
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 Point
impl ClampXy<usize> for Point
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 Point
impl<'de> Deserialize<'de> for Point
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<(i16, i16)> for Point
impl MaxXy<(i16, i16)> for Point
sourcefn max_xy(&self, value: (i16, i16)) -> Self
fn max_xy(&self, value: (i16, i16)) -> 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<(i32, i32)> for Point
impl MaxXy<(i32, i32)> for Point
sourcefn max_xy(&self, value: (i32, i32)) -> Self
fn max_xy(&self, value: (i32, i32)) -> 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<(i64, i64)> for Point
impl MaxXy<(i64, i64)> for Point
sourcefn max_xy(&self, value: (i64, i64)) -> Self
fn max_xy(&self, value: (i64, i64)) -> 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<(i8, i8)> for Point
impl MaxXy<(i8, i8)> for Point
sourcefn max_xy(&self, value: (i8, i8)) -> Self
fn max_xy(&self, value: (i8, i8)) -> 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<(isize, isize)> for Point
impl MaxXy<(isize, isize)> for Point
sourcefn max_xy(&self, value: (isize, isize)) -> Self
fn max_xy(&self, value: (isize, isize)) -> 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, u16)> for Point
impl MaxXy<(u16, u16)> for Point
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 Point
impl MaxXy<(u32, u32)> for Point
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 Point
impl MaxXy<(u64, u64)> for Point
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 Point
impl MaxXy<(u8, u8)> for Point
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 Point
impl MaxXy<(usize, usize)> for Point
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<Point> for Point
impl MaxXy<Point> for Point
sourcefn max_xy(&self, value: Point) -> Self
fn max_xy(&self, value: Point) -> 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<i16> for Point
impl MaxXy<i16> for Point
sourcefn max_xy(&self, value: i16) -> Self
fn max_xy(&self, value: i16) -> 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<i32> for Point
impl MaxXy<i32> for Point
sourcefn max_xy(&self, value: i32) -> Self
fn max_xy(&self, value: i32) -> 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<i64> for Point
impl MaxXy<i64> for Point
sourcefn max_xy(&self, value: i64) -> Self
fn max_xy(&self, value: i64) -> 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<i8> for Point
impl MaxXy<i8> for Point
sourcefn max_xy(&self, value: i8) -> Self
fn max_xy(&self, value: i8) -> 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<isize> for Point
impl MaxXy<isize> for Point
sourcefn max_xy(&self, value: isize) -> Self
fn max_xy(&self, value: isize) -> 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 Point
impl MaxXy<u16> for Point
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 Point
impl MaxXy<u32> for Point
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 Point
impl MaxXy<u64> for Point
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 Point
impl MaxXy<u8> for Point
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 Point
impl MaxXy<usize> for Point
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<(i16, i16)> for Point
impl MinXy<(i16, i16)> for Point
sourcefn min_xy(&self, value: (i16, i16)) -> Self
fn min_xy(&self, value: (i16, i16)) -> 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<(i32, i32)> for Point
impl MinXy<(i32, i32)> for Point
sourcefn min_xy(&self, value: (i32, i32)) -> Self
fn min_xy(&self, value: (i32, i32)) -> 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<(i64, i64)> for Point
impl MinXy<(i64, i64)> for Point
sourcefn min_xy(&self, value: (i64, i64)) -> Self
fn min_xy(&self, value: (i64, i64)) -> 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<(i8, i8)> for Point
impl MinXy<(i8, i8)> for Point
sourcefn min_xy(&self, value: (i8, i8)) -> Self
fn min_xy(&self, value: (i8, i8)) -> 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<(isize, isize)> for Point
impl MinXy<(isize, isize)> for Point
sourcefn min_xy(&self, value: (isize, isize)) -> Self
fn min_xy(&self, value: (isize, isize)) -> 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, u16)> for Point
impl MinXy<(u16, u16)> for Point
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 Point
impl MinXy<(u32, u32)> for Point
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 Point
impl MinXy<(u64, u64)> for Point
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 Point
impl MinXy<(u8, u8)> for Point
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 Point
impl MinXy<(usize, usize)> for Point
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<Point> for Point
impl MinXy<Point> for Point
sourcefn min_xy(&self, value: Point) -> Self
fn min_xy(&self, value: Point) -> 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<i16> for Point
impl MinXy<i16> for Point
sourcefn min_xy(&self, value: i16) -> Self
fn min_xy(&self, value: i16) -> 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<i32> for Point
impl MinXy<i32> for Point
sourcefn min_xy(&self, value: i32) -> Self
fn min_xy(&self, value: i32) -> 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<i64> for Point
impl MinXy<i64> for Point
sourcefn min_xy(&self, value: i64) -> Self
fn min_xy(&self, value: i64) -> 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<i8> for Point
impl MinXy<i8> for Point
sourcefn min_xy(&self, value: i8) -> Self
fn min_xy(&self, value: i8) -> 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<isize> for Point
impl MinXy<isize> for Point
sourcefn min_xy(&self, value: isize) -> Self
fn min_xy(&self, value: isize) -> 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 Point
impl MinXy<u16> for Point
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 Point
impl MinXy<u32> for Point
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 Point
impl MinXy<u64> for Point
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 Point
impl MinXy<u8> for Point
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 Point
impl MinXy<usize> for Point
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 Point
impl Ord for Point
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<Point> for Point
impl PartialEq<Point> for Point
sourceimpl PartialOrd<Point> for Point
impl PartialOrd<Point> for Point
sourcefn partial_cmp(&self, other: &Point) -> Option<Ordering>
fn partial_cmp(&self, other: &Point) -> 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 Point
impl SimpleMath for Point
impl Copy for Point
impl Eq for Point
impl StructuralEq for Point
impl StructuralPartialEq for Point
Auto Trait Implementations
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
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()
.