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