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