pub struct Size64 { /* private fields */ }Expand description
A 2D size using a positive clamped i64.
Implementations§
source§impl Size64
impl Size64
source§impl Size64
impl Size64
pub const fn as_tuple(&self) -> (i64, i64)
pub const fn from_tuple(tup: (i64, i64)) -> Size64
pub const fn as_tuple_i32(&self) -> (i32, i32)
pub const fn from_tuple_i32(tup: (i32, i32)) -> Size64
pub const fn as_tuple_u32(&self) -> (u32, u32)
pub const fn from_tuple_u32(tup: (u32, u32)) -> Size64
pub const fn as_tuple_u16(&self) -> (u16, u16)
pub const fn from_tuple_u16(tup: (u16, u16)) -> Size64
pub const fn as_tuple_i16(&self) -> (i16, i16)
pub const fn from_tuple_i16(tup: (i16, i16)) -> Size64
pub const fn as_tuple_usize(&self) -> (usize, usize)
pub const fn from_tuple_usize(tup: (usize, usize)) -> Size64
source§impl Size64
impl Size64
sourcepub const fn saturating_add(&self, rhs: Size64) -> Size64
pub const fn saturating_add(&self, rhs: Size64) -> Size64
Saturating, clamped addition of two Size64.
sourcepub const fn wrapping_add(&self, rhs: Size64) -> Size64
pub const fn wrapping_add(&self, rhs: Size64) -> Size64
Wrapping, clamped addition of two Size64.
sourcepub fn checked_add(&self, rhs: Size64) -> Option<Size64>
pub fn checked_add(&self, rhs: Size64) -> Option<Size64>
Checked, clamped addition of two Size64.
sourcepub const fn saturating_sub(&self, rhs: Size64) -> Size64
pub const fn saturating_sub(&self, rhs: Size64) -> Size64
Saturating, clamped addition of two Size64.
sourcepub const fn wrapping_sub(&self, rhs: Size64) -> Size64
pub const fn wrapping_sub(&self, rhs: Size64) -> Size64
Wrapping, clamped addition of two Size64.
sourcepub fn checked_sub(&self, rhs: Size64) -> Option<Size64>
pub fn checked_sub(&self, rhs: Size64) -> Option<Size64>
Checked, clamped addition of two Size64.
sourcepub const fn saturating_mul(&self, rhs: Size64) -> Size64
pub const fn saturating_mul(&self, rhs: Size64) -> Size64
Saturating, clamped multiplication of two Size64.
sourcepub const fn wrapping_mul(&self, rhs: Size64) -> Size64
pub const fn wrapping_mul(&self, rhs: Size64) -> Size64
Wrapping, clamped multiplication of two Size64.
sourcepub fn checked_mul(&self, rhs: Size64) -> Option<Size64>
pub fn checked_mul(&self, rhs: Size64) -> Option<Size64>
Checked, clamped multiplication of two Size64.
sourcepub const fn saturating_div(&self, rhs: Size64) -> Size64
pub const fn saturating_div(&self, rhs: Size64) -> Size64
Saturating, clamped division of two Size64.
sourcepub const fn wrapping_div(&self, rhs: Size64) -> Size64
pub const fn wrapping_div(&self, rhs: Size64) -> Size64
Wrapping, clamped division of two Size64.
sourcepub fn checked_div(&self, rhs: Size64) -> Option<Size64>
pub fn checked_div(&self, rhs: Size64) -> Option<Size64>
Checked, clamped division of two Size64.
sourcepub const fn saturating_add_value(&self, value: i64) -> Size64
pub const fn saturating_add_value(&self, value: i64) -> Size64
Saturating, clamped addition of a Size64 with a value``.
sourcepub const fn wrapping_add_value(&self, value: i64) -> Size64
pub const fn wrapping_add_value(&self, value: i64) -> Size64
Wrapping, clamped addition of a Size64 with a value``.
sourcepub fn checked_add_value(&self, value: i64) -> Option<Size64>
pub fn checked_add_value(&self, value: i64) -> Option<Size64>
Checked, clamped addition of a Size64 with a value``.
sourcepub const fn saturating_sub_value(&self, value: i64) -> Size64
pub const fn saturating_sub_value(&self, value: i64) -> Size64
Saturating, clamped substraction of a Size64 with a value``.
sourcepub const fn wrapping_sub_value(&self, value: i64) -> Size64
pub const fn wrapping_sub_value(&self, value: i64) -> Size64
Wrapping, clamped substraction of a Size64 with a value``.
sourcepub fn checked_sub_value(&self, value: i64) -> Option<Size64>
pub fn checked_sub_value(&self, value: i64) -> Option<Size64>
Checked, clamped substraction of a Size64 with a value``.
sourcepub const fn saturating_mul_value(&self, value: i64) -> Size64
pub const fn saturating_mul_value(&self, value: i64) -> Size64
Saturating, clamped multiplication of a Size64 with a value``.
sourcepub const fn wrapping_mul_value(&self, value: i64) -> Size64
pub const fn wrapping_mul_value(&self, value: i64) -> Size64
Wrapping, clamped multiplication of a Size64 with a value``.
sourcepub fn checked_mul_value(&self, value: i64) -> Option<Size64>
pub fn checked_mul_value(&self, value: i64) -> Option<Size64>
Checked, clamped multiplication of a Size64 with a value``.
sourcepub const fn saturating_div_value(&self, value: i64) -> Size64
pub const fn saturating_div_value(&self, value: i64) -> Size64
Saturating, clamped division of a Size64 with a value``.
sourcepub const fn wrapping_div_value(&self, value: i64) -> Size64
pub const fn wrapping_div_value(&self, value: i64) -> Size64
Wrapping, clamped division of a Size64 with a value``.
sourcepub fn checked_div_value(&self, value: i64) -> Option<Size64>
pub fn checked_div_value(&self, value: i64) -> Option<Size64>
Checked, clamped division of a Size64 with a value``.
Trait Implementations§
source§impl Ord for Size64
impl Ord for Size64
source§impl PartialEq<Size64> for Size64
impl PartialEq<Size64> for Size64
source§impl PartialOrd<Size64> for Size64
impl PartialOrd<Size64> for Size64
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more