pub struct Size32 { /* private fields */ }Expand description
A 2D size using a positive clamped i32.
Implementations§
Source§impl Size32
impl Size32
Source§impl Size32
§conversions
impl Size32
§conversions
pub const fn as_tuple(&self) -> (i32, i32)
pub const fn from_tuple(tup: (i32, i32)) -> Size32
pub const fn as_tuple_i32(&self) -> (i32, i32)
pub const fn from_tuple_i32(tup: (i32, i32)) -> Size32
pub const fn as_tuple_u32(&self) -> (u32, u32)
pub const fn from_tuple_u32(tup: (u32, u32)) -> Size32
pub const fn as_tuple_u16(&self) -> (u16, u16)
pub const fn from_tuple_u16(tup: (u16, u16)) -> Size32
pub const fn as_tuple_i16(&self) -> (i16, i16)
pub const fn from_tuple_i16(tup: (i16, i16)) -> Size32
pub const fn as_tuple_usize(&self) -> (usize, usize)
pub const fn from_tuple_usize(tup: (usize, usize)) -> Size32
Source§impl Size32
§arithmetic ops.
impl Size32
§arithmetic ops.
Sourcepub const fn saturating_add(&self, rhs: Size32) -> Size32
pub const fn saturating_add(&self, rhs: Size32) -> Size32
Saturating, clamped addition of two Size32.
Sourcepub const fn wrapping_add(&self, rhs: Size32) -> Size32
pub const fn wrapping_add(&self, rhs: Size32) -> Size32
Wrapping, clamped addition of two Size32.
Sourcepub fn checked_add(&self, rhs: Size32) -> Option<Size32>
pub fn checked_add(&self, rhs: Size32) -> Option<Size32>
Checked, clamped addition of two Size32.
Sourcepub const fn saturating_sub(&self, rhs: Size32) -> Size32
pub const fn saturating_sub(&self, rhs: Size32) -> Size32
Saturating, clamped addition of two Size32.
Sourcepub const fn wrapping_sub(&self, rhs: Size32) -> Size32
pub const fn wrapping_sub(&self, rhs: Size32) -> Size32
Wrapping, clamped addition of two Size32.
Sourcepub fn checked_sub(&self, rhs: Size32) -> Option<Size32>
pub fn checked_sub(&self, rhs: Size32) -> Option<Size32>
Checked, clamped addition of two Size32.
Sourcepub const fn saturating_mul(&self, rhs: Size32) -> Size32
pub const fn saturating_mul(&self, rhs: Size32) -> Size32
Saturating, clamped multiplication of two Size32.
Sourcepub const fn wrapping_mul(&self, rhs: Size32) -> Size32
pub const fn wrapping_mul(&self, rhs: Size32) -> Size32
Wrapping, clamped multiplication of two Size32.
Sourcepub fn checked_mul(&self, rhs: Size32) -> Option<Size32>
pub fn checked_mul(&self, rhs: Size32) -> Option<Size32>
Checked, clamped multiplication of two Size32.
Sourcepub const fn saturating_div(&self, rhs: Size32) -> Size32
pub const fn saturating_div(&self, rhs: Size32) -> Size32
Saturating, clamped division of two Size32.
Sourcepub const fn wrapping_div(&self, rhs: Size32) -> Size32
pub const fn wrapping_div(&self, rhs: Size32) -> Size32
Wrapping, clamped division of two Size32.
Sourcepub fn checked_div(&self, rhs: Size32) -> Option<Size32>
pub fn checked_div(&self, rhs: Size32) -> Option<Size32>
Checked, clamped division of two Size32.
Sourcepub const fn saturating_add_value(&self, value: i32) -> Size32
pub const fn saturating_add_value(&self, value: i32) -> Size32
Saturating, clamped addition of a Size32 with a value``.
Sourcepub const fn wrapping_add_value(&self, value: i32) -> Size32
pub const fn wrapping_add_value(&self, value: i32) -> Size32
Wrapping, clamped addition of a Size32 with a value``.
Sourcepub fn checked_add_value(&self, value: i32) -> Option<Size32>
pub fn checked_add_value(&self, value: i32) -> Option<Size32>
Checked, clamped addition of a Size32 with a value``.
Sourcepub const fn saturating_sub_value(&self, value: i32) -> Size32
pub const fn saturating_sub_value(&self, value: i32) -> Size32
Saturating, clamped substraction of a Size32 with a value``.
Sourcepub const fn wrapping_sub_value(&self, value: i32) -> Size32
pub const fn wrapping_sub_value(&self, value: i32) -> Size32
Wrapping, clamped substraction of a Size32 with a value``.
Sourcepub fn checked_sub_value(&self, value: i32) -> Option<Size32>
pub fn checked_sub_value(&self, value: i32) -> Option<Size32>
Checked, clamped substraction of a Size32 with a value``.
Sourcepub const fn saturating_mul_value(&self, value: i32) -> Size32
pub const fn saturating_mul_value(&self, value: i32) -> Size32
Saturating, clamped multiplication of a Size32 with a value``.
Sourcepub const fn wrapping_mul_value(&self, value: i32) -> Size32
pub const fn wrapping_mul_value(&self, value: i32) -> Size32
Wrapping, clamped multiplication of a Size32 with a value``.
Sourcepub fn checked_mul_value(&self, value: i32) -> Option<Size32>
pub fn checked_mul_value(&self, value: i32) -> Option<Size32>
Checked, clamped multiplication of a Size32 with a value``.
Sourcepub const fn saturating_div_value(&self, value: i32) -> Size32
pub const fn saturating_div_value(&self, value: i32) -> Size32
Saturating, clamped division of a Size32 with a value``.
Sourcepub const fn wrapping_div_value(&self, value: i32) -> Size32
pub const fn wrapping_div_value(&self, value: i32) -> Size32
Wrapping, clamped division of a Size32 with a value``.
Sourcepub fn checked_div_value(&self, value: i32) -> Option<Size32>
pub fn checked_div_value(&self, value: i32) -> Option<Size32>
Checked, clamped division of a Size32 with a value``.