#[repr(C)]pub struct Size2<U: Unit = f32> {
pub width: U::Scalar,
pub height: U::Scalar,
}
Expand description
2D size.
Fields§
§width: U::Scalar
Width
height: U::Scalar
Height
Implementations§
source§impl<T: Unit> Size2<T>
impl<T: Unit> Size2<T>
sourcepub fn from_vector(vec: Vector2<T>) -> Self
pub fn from_vector(vec: Vector2<T>) -> Self
Interpret vec
as size.
sourcepub fn as_vector_mut(&mut self) -> &mut Vector2<T>
pub fn as_vector_mut(&mut self) -> &mut Vector2<T>
Reinterpret as vector.
sourcepub fn with_width(self, width: T::Scalar) -> Self
pub fn with_width(self, width: T::Scalar) -> Self
Replace the width component with a new value.
sourcepub fn with_height(self, height: T::Scalar) -> Self
pub fn with_height(self, height: T::Scalar) -> Self
Replace the width component with a new value.
source§impl<T: Unit> Size2<T>
impl<T: Unit> Size2<T>
sourcepub fn min_element(self) -> T::Scalar
pub fn min_element(self) -> T::Scalar
Min element.
sourcepub fn max_element(self) -> T::Scalar
pub fn max_element(self) -> T::Scalar
Max element.
sourcepub fn write_to_slice(self, slice: &mut [T::Scalar])
pub fn write_to_slice(self, slice: &mut [T::Scalar])
Write this vector type to a slice.
sourcepub fn element_sum(self) -> T::Scalar
pub fn element_sum(self) -> T::Scalar
Sum of all elements.
sourcepub fn element_product(self) -> T::Scalar
pub fn element_product(self) -> T::Scalar
Product of all elements.
sourcepub fn as_array_mut(&mut self) -> &mut [T::Scalar; 2]
pub fn as_array_mut(&mut self) -> &mut [T::Scalar; 2]
Reinterpret as mutable array.
sourcepub fn map<F: Fn(T::Scalar) -> T::Scalar>(self, f: F) -> Self
pub fn map<F: Fn(T::Scalar) -> T::Scalar>(self, f: F) -> Self
Returns a vector containing each element of self
modified by a mapping function f
.
sourcepub fn from_untyped(untyped: Size2<T::Scalar>) -> Size2<T>
pub fn from_untyped(untyped: Size2<T::Scalar>) -> Size2<T>
Bitcast an untyped instance to self.
sourcepub fn to_untyped(self) -> Size2<T::Scalar>
pub fn to_untyped(self) -> Size2<T::Scalar>
Bitcast self to an untyped instance.
sourcepub fn as_untyped(&self) -> &Size2<T::Scalar>
pub fn as_untyped(&self) -> &Size2<T::Scalar>
Reinterpret cast self as the untyped variant.
sourcepub fn as_untyped_mut(&mut self) -> &mut Size2<T::Scalar>
pub fn as_untyped_mut(&mut self) -> &mut Size2<T::Scalar>
Reinterpret cast self as the untyped variant.
sourcepub fn cast<T2>(self) -> Size2<T2>
pub fn cast<T2>(self) -> Size2<T2>
Cast to a different coordinate space with the same underlying scalar type.
sourcepub fn cast_ref<T2>(&self) -> &Size2<T2>
pub fn cast_ref<T2>(&self) -> &Size2<T2>
Cast to a different coordinate space with the same underlying scalar type.
sourcepub fn cast_mut<T2>(&mut self) -> &mut Size2<T2>
pub fn cast_mut<T2>(&mut self) -> &mut Size2<T2>
Cast to a different coordinate space with the same underlying scalar type.
sourcepub fn as_<T2>(self) -> Size2<T2>
pub fn as_<T2>(self) -> Size2<T2>
Cast to a different coordinate space with scalar type conversion through the as
operator (potentially narrowing or losing precision).
sourcepub fn try_cast<T2>(self) -> Option<Size2<T2>>where
T2: Unit,
pub fn try_cast<T2>(self) -> Option<Size2<T2>>where
T2: Unit,
Cast to a different coordinate space with scalar type conversion. Returns None
if any component could not be converted to the target scalar type.
sourcepub fn from_tuple((width, height): (T::Scalar, T::Scalar)) -> Self
pub fn from_tuple((width, height): (T::Scalar, T::Scalar)) -> Self
Create from tuple.
source§impl<T: FloatUnit> Size2<T>
impl<T: FloatUnit> Size2<T>
sourcepub fn fract(self) -> Self
pub fn fract(self) -> Self
See (e.g.) glam::Vec2::fract()
sourcepub fn fract_gl(self) -> Self
pub fn fract_gl(self) -> Self
See (e.g.) glam::Vec2::fract_gl()
source§impl<T: SignedUnit> Size2<T>
impl<T: SignedUnit> Size2<T>
sourcepub fn abs(self) -> Self
pub fn abs(self) -> Self
Returns a vector containing the absolute value of each element of self
.
sourcepub fn rem_euclid(self, rhs: Self) -> Self
pub fn rem_euclid(self, rhs: Self) -> Self
Returns the element-wise remainder of Euclidean division of self`` by
rhs`.
§Panics
This function will panic if any rhs
element is 0 or the division results in overflow.
source§impl<T: IntUnit> Size2<T>
impl<T: IntUnit> Size2<T>
sourcepub fn saturating_add(self, rhs: Self) -> Self
pub fn saturating_add(self, rhs: Self) -> Self
Returns a vector containing the saturating addition of self and rhs.
sourcepub fn saturating_sub(self, rhs: Self) -> Self
pub fn saturating_sub(self, rhs: Self) -> Self
Returns a vector containing the saturating subtraction of self and rhs.
sourcepub fn saturating_mul(self, rhs: Self) -> Self
pub fn saturating_mul(self, rhs: Self) -> Self
Returns a vector containing the saturating multiplication of self and rhs.
sourcepub fn saturating_div(self, rhs: Self) -> Self
pub fn saturating_div(self, rhs: Self) -> Self
Returns a vector containing the saturating division of self and rhs.
sourcepub fn wrapping_add(self, rhs: Self) -> Self
pub fn wrapping_add(self, rhs: Self) -> Self
Returns a vector containing the wrapping addition of self and rhs.
sourcepub fn wrapping_sub(self, rhs: Self) -> Self
pub fn wrapping_sub(self, rhs: Self) -> Self
Returns a vector containing the wrapping subtraction of self and rhs.
sourcepub fn wrapping_mul(self, rhs: Self) -> Self
pub fn wrapping_mul(self, rhs: Self) -> Self
Returns a vector containing the wrapping multiplication of self and rhs.
sourcepub fn wrapping_div(self, rhs: Self) -> Self
pub fn wrapping_div(self, rhs: Self) -> Self
Returns a vector containing the wrapping division of self and rhs.
source§impl<T: Unit> Size2<T>
impl<T: Unit> Size2<T>
source§impl<T: FloatUnit> Size2<T>
impl<T: FloatUnit> Size2<T>
sourcepub const NEG_INFINITY: Self = _
pub const NEG_INFINITY: Self = _
All negative infinity.
sourcepub fn is_nan_mask(self) -> BVec2
pub fn is_nan_mask(self) -> BVec2
Return a mask where each bit is set if the corresponding component is NaN.
sourcepub fn is_finite_mask(self) -> BVec2
pub fn is_finite_mask(self) -> BVec2
Performs is_finite
on each element of self
, returning a vector mask of the results.
source§impl<T: SignedUnit> Size2<T>
impl<T: SignedUnit> Size2<T>
source§impl<T: Unit> Size2<T>
impl<T: Unit> Size2<T>
sourcepub fn from_array(array: [T::Scalar; 2]) -> Self
pub fn from_array(array: [T::Scalar; 2]) -> Self
Creates a new vector from an array.
sourcepub fn extend(self, z: T::Scalar) -> Size3<T>
pub fn extend(self, z: T::Scalar) -> Size3<T>
Creates a 3D vector from self and the given z value.
sourcepub fn cmpeq(self, rhs: Self) -> BVec2
pub fn cmpeq(self, rhs: Self) -> BVec2
Returns a vector mask containing the result of a == comparison for each element of self
and rhs
.
sourcepub fn cmpne(self, rhs: Self) -> BVec2
pub fn cmpne(self, rhs: Self) -> BVec2
Returns a vector mask containing the result of a != comparison for each element of self
and rhs
.
sourcepub fn cmpge(self, rhs: Self) -> BVec2
pub fn cmpge(self, rhs: Self) -> BVec2
Returns a vector mask containing the result of a >= comparison for each element of self
and rhs
.
sourcepub fn cmpgt(self, rhs: Self) -> BVec2
pub fn cmpgt(self, rhs: Self) -> BVec2
Returns a vector mask containing the result of a > comparison for each element of self
and rhs
.
sourcepub fn cmple(self, rhs: Self) -> BVec2
pub fn cmple(self, rhs: Self) -> BVec2
Returns a vector mask containing the result of a <= comparison for each element of self
and rhs
.
Trait Implementations§
source§impl<T: FloatUnit> AbsDiffEq for Size2<T>
impl<T: FloatUnit> AbsDiffEq for Size2<T>
source§type Epsilon = <<T as Unit>::Scalar as AbsDiffEq>::Epsilon
type Epsilon = <<T as Unit>::Scalar as AbsDiffEq>::Epsilon
source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
source§fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool
AbsDiffEq::abs_diff_eq
.source§impl<T: Unit> AddAssign<&Size2<T>> for Size2<T>
impl<T: Unit> AddAssign<&Size2<T>> for Size2<T>
source§fn add_assign(&mut self, rhs: &Size2<T>)
fn add_assign(&mut self, rhs: &Size2<T>)
+=
operation. Read moresource§impl<T: Unit<Scalar = f32>> AddAssign<&f32> for Size2<T>
impl<T: Unit<Scalar = f32>> AddAssign<&f32> for Size2<T>
source§fn add_assign(&mut self, rhs: &f32)
fn add_assign(&mut self, rhs: &f32)
+=
operation. Read moresource§impl<T: Unit<Scalar = f64>> AddAssign<&f64> for Size2<T>
impl<T: Unit<Scalar = f64>> AddAssign<&f64> for Size2<T>
source§fn add_assign(&mut self, rhs: &f64)
fn add_assign(&mut self, rhs: &f64)
+=
operation. Read moresource§impl<T: Unit<Scalar = i16>> AddAssign<&i16> for Size2<T>
impl<T: Unit<Scalar = i16>> AddAssign<&i16> for Size2<T>
source§fn add_assign(&mut self, rhs: &i16)
fn add_assign(&mut self, rhs: &i16)
+=
operation. Read moresource§impl<T: Unit<Scalar = i32>> AddAssign<&i32> for Size2<T>
impl<T: Unit<Scalar = i32>> AddAssign<&i32> for Size2<T>
source§fn add_assign(&mut self, rhs: &i32)
fn add_assign(&mut self, rhs: &i32)
+=
operation. Read moresource§impl<T: Unit<Scalar = i64>> AddAssign<&i64> for Size2<T>
impl<T: Unit<Scalar = i64>> AddAssign<&i64> for Size2<T>
source§fn add_assign(&mut self, rhs: &i64)
fn add_assign(&mut self, rhs: &i64)
+=
operation. Read moresource§impl<T: Unit<Scalar = u16>> AddAssign<&u16> for Size2<T>
impl<T: Unit<Scalar = u16>> AddAssign<&u16> for Size2<T>
source§fn add_assign(&mut self, rhs: &u16)
fn add_assign(&mut self, rhs: &u16)
+=
operation. Read moresource§impl<T: Unit<Scalar = u32>> AddAssign<&u32> for Size2<T>
impl<T: Unit<Scalar = u32>> AddAssign<&u32> for Size2<T>
source§fn add_assign(&mut self, rhs: &u32)
fn add_assign(&mut self, rhs: &u32)
+=
operation. Read moresource§impl<T: Unit<Scalar = u64>> AddAssign<&u64> for Size2<T>
impl<T: Unit<Scalar = u64>> AddAssign<&u64> for Size2<T>
source§fn add_assign(&mut self, rhs: &u64)
fn add_assign(&mut self, rhs: &u64)
+=
operation. Read moresource§impl<T: Unit<Scalar = f32>> AddAssign<f32> for Size2<T>
impl<T: Unit<Scalar = f32>> AddAssign<f32> for Size2<T>
source§fn add_assign(&mut self, rhs: f32)
fn add_assign(&mut self, rhs: f32)
+=
operation. Read moresource§impl<T: Unit<Scalar = f64>> AddAssign<f64> for Size2<T>
impl<T: Unit<Scalar = f64>> AddAssign<f64> for Size2<T>
source§fn add_assign(&mut self, rhs: f64)
fn add_assign(&mut self, rhs: f64)
+=
operation. Read moresource§impl<T: Unit<Scalar = i16>> AddAssign<i16> for Size2<T>
impl<T: Unit<Scalar = i16>> AddAssign<i16> for Size2<T>
source§fn add_assign(&mut self, rhs: i16)
fn add_assign(&mut self, rhs: i16)
+=
operation. Read moresource§impl<T: Unit<Scalar = i32>> AddAssign<i32> for Size2<T>
impl<T: Unit<Scalar = i32>> AddAssign<i32> for Size2<T>
source§fn add_assign(&mut self, rhs: i32)
fn add_assign(&mut self, rhs: i32)
+=
operation. Read moresource§impl<T: Unit<Scalar = i64>> AddAssign<i64> for Size2<T>
impl<T: Unit<Scalar = i64>> AddAssign<i64> for Size2<T>
source§fn add_assign(&mut self, rhs: i64)
fn add_assign(&mut self, rhs: i64)
+=
operation. Read moresource§impl<T: Unit<Scalar = u16>> AddAssign<u16> for Size2<T>
impl<T: Unit<Scalar = u16>> AddAssign<u16> for Size2<T>
source§fn add_assign(&mut self, rhs: u16)
fn add_assign(&mut self, rhs: u16)
+=
operation. Read moresource§impl<T: Unit<Scalar = u32>> AddAssign<u32> for Size2<T>
impl<T: Unit<Scalar = u32>> AddAssign<u32> for Size2<T>
source§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
+=
operation. Read moresource§impl<T: Unit<Scalar = u64>> AddAssign<u64> for Size2<T>
impl<T: Unit<Scalar = u64>> AddAssign<u64> for Size2<T>
source§fn add_assign(&mut self, rhs: u64)
fn add_assign(&mut self, rhs: u64)
+=
operation. Read moresource§impl<T: Unit> AddAssign for Size2<T>
impl<T: Unit> AddAssign for Size2<T>
source§fn add_assign(&mut self, rhs: Size2<T>)
fn add_assign(&mut self, rhs: Size2<T>)
+=
operation. Read moresource§impl<T: Unit<Scalar = f64>> BorrowMut<DVec2> for Size2<T>
impl<T: Unit<Scalar = f64>> BorrowMut<DVec2> for Size2<T>
source§fn borrow_mut(&mut self) -> &mut DVec2
fn borrow_mut(&mut self) -> &mut DVec2
source§impl<T: Unit<Scalar = i16>> BorrowMut<I16Vec2> for Size2<T>
impl<T: Unit<Scalar = i16>> BorrowMut<I16Vec2> for Size2<T>
source§fn borrow_mut(&mut self) -> &mut I16Vec2
fn borrow_mut(&mut self) -> &mut I16Vec2
source§impl<T: Unit<Scalar = i64>> BorrowMut<I64Vec2> for Size2<T>
impl<T: Unit<Scalar = i64>> BorrowMut<I64Vec2> for Size2<T>
source§fn borrow_mut(&mut self) -> &mut I64Vec2
fn borrow_mut(&mut self) -> &mut I64Vec2
source§impl<T: Unit<Scalar = i32>> BorrowMut<IVec2> for Size2<T>
impl<T: Unit<Scalar = i32>> BorrowMut<IVec2> for Size2<T>
source§fn borrow_mut(&mut self) -> &mut IVec2
fn borrow_mut(&mut self) -> &mut IVec2
source§impl<T: Unit<Scalar = u16>> BorrowMut<U16Vec2> for Size2<T>
impl<T: Unit<Scalar = u16>> BorrowMut<U16Vec2> for Size2<T>
source§fn borrow_mut(&mut self) -> &mut U16Vec2
fn borrow_mut(&mut self) -> &mut U16Vec2
source§impl<T: Unit<Scalar = u64>> BorrowMut<U64Vec2> for Size2<T>
impl<T: Unit<Scalar = u64>> BorrowMut<U64Vec2> for Size2<T>
source§fn borrow_mut(&mut self) -> &mut U64Vec2
fn borrow_mut(&mut self) -> &mut U64Vec2
source§impl<T: Unit<Scalar = u32>> BorrowMut<UVec2> for Size2<T>
impl<T: Unit<Scalar = u32>> BorrowMut<UVec2> for Size2<T>
source§fn borrow_mut(&mut self) -> &mut UVec2
fn borrow_mut(&mut self) -> &mut UVec2
source§impl<T: Unit<Scalar = f32>> BorrowMut<Vec2> for Size2<T>
impl<T: Unit<Scalar = f32>> BorrowMut<Vec2> for Size2<T>
source§fn borrow_mut(&mut self) -> &mut Vec2
fn borrow_mut(&mut self) -> &mut Vec2
source§impl<T: Unit> DivAssign<&Size2<T>> for Size2<T>
impl<T: Unit> DivAssign<&Size2<T>> for Size2<T>
source§fn div_assign(&mut self, rhs: &Size2<T>)
fn div_assign(&mut self, rhs: &Size2<T>)
/=
operation. Read moresource§impl<T: Unit<Scalar = f32>> DivAssign<&f32> for Size2<T>
impl<T: Unit<Scalar = f32>> DivAssign<&f32> for Size2<T>
source§fn div_assign(&mut self, rhs: &f32)
fn div_assign(&mut self, rhs: &f32)
/=
operation. Read moresource§impl<T: Unit<Scalar = f64>> DivAssign<&f64> for Size2<T>
impl<T: Unit<Scalar = f64>> DivAssign<&f64> for Size2<T>
source§fn div_assign(&mut self, rhs: &f64)
fn div_assign(&mut self, rhs: &f64)
/=
operation. Read moresource§impl<T: Unit<Scalar = i16>> DivAssign<&i16> for Size2<T>
impl<T: Unit<Scalar = i16>> DivAssign<&i16> for Size2<T>
source§fn div_assign(&mut self, rhs: &i16)
fn div_assign(&mut self, rhs: &i16)
/=
operation. Read moresource§impl<T: Unit<Scalar = i32>> DivAssign<&i32> for Size2<T>
impl<T: Unit<Scalar = i32>> DivAssign<&i32> for Size2<T>
source§fn div_assign(&mut self, rhs: &i32)
fn div_assign(&mut self, rhs: &i32)
/=
operation. Read moresource§impl<T: Unit<Scalar = i64>> DivAssign<&i64> for Size2<T>
impl<T: Unit<Scalar = i64>> DivAssign<&i64> for Size2<T>
source§fn div_assign(&mut self, rhs: &i64)
fn div_assign(&mut self, rhs: &i64)
/=
operation. Read moresource§impl<T: Unit<Scalar = u16>> DivAssign<&u16> for Size2<T>
impl<T: Unit<Scalar = u16>> DivAssign<&u16> for Size2<T>
source§fn div_assign(&mut self, rhs: &u16)
fn div_assign(&mut self, rhs: &u16)
/=
operation. Read moresource§impl<T: Unit<Scalar = u32>> DivAssign<&u32> for Size2<T>
impl<T: Unit<Scalar = u32>> DivAssign<&u32> for Size2<T>
source§fn div_assign(&mut self, rhs: &u32)
fn div_assign(&mut self, rhs: &u32)
/=
operation. Read moresource§impl<T: Unit<Scalar = u64>> DivAssign<&u64> for Size2<T>
impl<T: Unit<Scalar = u64>> DivAssign<&u64> for Size2<T>
source§fn div_assign(&mut self, rhs: &u64)
fn div_assign(&mut self, rhs: &u64)
/=
operation. Read moresource§impl<T: Unit<Scalar = f32>> DivAssign<f32> for Size2<T>
impl<T: Unit<Scalar = f32>> DivAssign<f32> for Size2<T>
source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
/=
operation. Read moresource§impl<T: Unit<Scalar = f64>> DivAssign<f64> for Size2<T>
impl<T: Unit<Scalar = f64>> DivAssign<f64> for Size2<T>
source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
/=
operation. Read moresource§impl<T: Unit<Scalar = i16>> DivAssign<i16> for Size2<T>
impl<T: Unit<Scalar = i16>> DivAssign<i16> for Size2<T>
source§fn div_assign(&mut self, rhs: i16)
fn div_assign(&mut self, rhs: i16)
/=
operation. Read moresource§impl<T: Unit<Scalar = i32>> DivAssign<i32> for Size2<T>
impl<T: Unit<Scalar = i32>> DivAssign<i32> for Size2<T>
source§fn div_assign(&mut self, rhs: i32)
fn div_assign(&mut self, rhs: i32)
/=
operation. Read moresource§impl<T: Unit<Scalar = i64>> DivAssign<i64> for Size2<T>
impl<T: Unit<Scalar = i64>> DivAssign<i64> for Size2<T>
source§fn div_assign(&mut self, rhs: i64)
fn div_assign(&mut self, rhs: i64)
/=
operation. Read moresource§impl<T: Unit<Scalar = u16>> DivAssign<u16> for Size2<T>
impl<T: Unit<Scalar = u16>> DivAssign<u16> for Size2<T>
source§fn div_assign(&mut self, rhs: u16)
fn div_assign(&mut self, rhs: u16)
/=
operation. Read moresource§impl<T: Unit<Scalar = u32>> DivAssign<u32> for Size2<T>
impl<T: Unit<Scalar = u32>> DivAssign<u32> for Size2<T>
source§fn div_assign(&mut self, rhs: u32)
fn div_assign(&mut self, rhs: u32)
/=
operation. Read moresource§impl<T: Unit<Scalar = u64>> DivAssign<u64> for Size2<T>
impl<T: Unit<Scalar = u64>> DivAssign<u64> for Size2<T>
source§fn div_assign(&mut self, rhs: u64)
fn div_assign(&mut self, rhs: u64)
/=
operation. Read moresource§impl<T: Unit> DivAssign for Size2<T>
impl<T: Unit> DivAssign for Size2<T>
source§fn div_assign(&mut self, rhs: Size2<T>)
fn div_assign(&mut self, rhs: Size2<T>)
/=
operation. Read moresource§impl<T: Unit> IntoIterator for Size2<T>
impl<T: Unit> IntoIterator for Size2<T>
source§impl<T: Unit> MulAssign<&Size2<T>> for Size2<T>
impl<T: Unit> MulAssign<&Size2<T>> for Size2<T>
source§fn mul_assign(&mut self, rhs: &Size2<T>)
fn mul_assign(&mut self, rhs: &Size2<T>)
*=
operation. Read moresource§impl<T: Unit<Scalar = f32>> MulAssign<&f32> for Size2<T>
impl<T: Unit<Scalar = f32>> MulAssign<&f32> for Size2<T>
source§fn mul_assign(&mut self, rhs: &f32)
fn mul_assign(&mut self, rhs: &f32)
*=
operation. Read moresource§impl<T: Unit<Scalar = f64>> MulAssign<&f64> for Size2<T>
impl<T: Unit<Scalar = f64>> MulAssign<&f64> for Size2<T>
source§fn mul_assign(&mut self, rhs: &f64)
fn mul_assign(&mut self, rhs: &f64)
*=
operation. Read moresource§impl<T: Unit<Scalar = i16>> MulAssign<&i16> for Size2<T>
impl<T: Unit<Scalar = i16>> MulAssign<&i16> for Size2<T>
source§fn mul_assign(&mut self, rhs: &i16)
fn mul_assign(&mut self, rhs: &i16)
*=
operation. Read moresource§impl<T: Unit<Scalar = i32>> MulAssign<&i32> for Size2<T>
impl<T: Unit<Scalar = i32>> MulAssign<&i32> for Size2<T>
source§fn mul_assign(&mut self, rhs: &i32)
fn mul_assign(&mut self, rhs: &i32)
*=
operation. Read moresource§impl<T: Unit<Scalar = i64>> MulAssign<&i64> for Size2<T>
impl<T: Unit<Scalar = i64>> MulAssign<&i64> for Size2<T>
source§fn mul_assign(&mut self, rhs: &i64)
fn mul_assign(&mut self, rhs: &i64)
*=
operation. Read moresource§impl<T: Unit<Scalar = u16>> MulAssign<&u16> for Size2<T>
impl<T: Unit<Scalar = u16>> MulAssign<&u16> for Size2<T>
source§fn mul_assign(&mut self, rhs: &u16)
fn mul_assign(&mut self, rhs: &u16)
*=
operation. Read moresource§impl<T: Unit<Scalar = u32>> MulAssign<&u32> for Size2<T>
impl<T: Unit<Scalar = u32>> MulAssign<&u32> for Size2<T>
source§fn mul_assign(&mut self, rhs: &u32)
fn mul_assign(&mut self, rhs: &u32)
*=
operation. Read moresource§impl<T: Unit<Scalar = u64>> MulAssign<&u64> for Size2<T>
impl<T: Unit<Scalar = u64>> MulAssign<&u64> for Size2<T>
source§fn mul_assign(&mut self, rhs: &u64)
fn mul_assign(&mut self, rhs: &u64)
*=
operation. Read moresource§impl<T: Unit<Scalar = f32>> MulAssign<f32> for Size2<T>
impl<T: Unit<Scalar = f32>> MulAssign<f32> for Size2<T>
source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
*=
operation. Read moresource§impl<T: Unit<Scalar = f64>> MulAssign<f64> for Size2<T>
impl<T: Unit<Scalar = f64>> MulAssign<f64> for Size2<T>
source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
*=
operation. Read moresource§impl<T: Unit<Scalar = i16>> MulAssign<i16> for Size2<T>
impl<T: Unit<Scalar = i16>> MulAssign<i16> for Size2<T>
source§fn mul_assign(&mut self, rhs: i16)
fn mul_assign(&mut self, rhs: i16)
*=
operation. Read moresource§impl<T: Unit<Scalar = i32>> MulAssign<i32> for Size2<T>
impl<T: Unit<Scalar = i32>> MulAssign<i32> for Size2<T>
source§fn mul_assign(&mut self, rhs: i32)
fn mul_assign(&mut self, rhs: i32)
*=
operation. Read moresource§impl<T: Unit<Scalar = i64>> MulAssign<i64> for Size2<T>
impl<T: Unit<Scalar = i64>> MulAssign<i64> for Size2<T>
source§fn mul_assign(&mut self, rhs: i64)
fn mul_assign(&mut self, rhs: i64)
*=
operation. Read moresource§impl<T: Unit<Scalar = u16>> MulAssign<u16> for Size2<T>
impl<T: Unit<Scalar = u16>> MulAssign<u16> for Size2<T>
source§fn mul_assign(&mut self, rhs: u16)
fn mul_assign(&mut self, rhs: u16)
*=
operation. Read moresource§impl<T: Unit<Scalar = u32>> MulAssign<u32> for Size2<T>
impl<T: Unit<Scalar = u32>> MulAssign<u32> for Size2<T>
source§fn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
*=
operation. Read moresource§impl<T: Unit<Scalar = u64>> MulAssign<u64> for Size2<T>
impl<T: Unit<Scalar = u64>> MulAssign<u64> for Size2<T>
source§fn mul_assign(&mut self, rhs: u64)
fn mul_assign(&mut self, rhs: u64)
*=
operation. Read moresource§impl<T: Unit> MulAssign for Size2<T>
impl<T: Unit> MulAssign for Size2<T>
source§fn mul_assign(&mut self, rhs: Size2<T>)
fn mul_assign(&mut self, rhs: Size2<T>)
*=
operation. Read moresource§impl<T: FloatUnit> RelativeEq for Size2<T>
impl<T: FloatUnit> RelativeEq for Size2<T>
source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
source§fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
RelativeEq::relative_eq
.source§impl<T: Unit> RemAssign<&Size2<T>> for Size2<T>
impl<T: Unit> RemAssign<&Size2<T>> for Size2<T>
source§fn rem_assign(&mut self, rhs: &Size2<T>)
fn rem_assign(&mut self, rhs: &Size2<T>)
%=
operation. Read moresource§impl<T: Unit<Scalar = f32>> RemAssign<&f32> for Size2<T>
impl<T: Unit<Scalar = f32>> RemAssign<&f32> for Size2<T>
source§fn rem_assign(&mut self, rhs: &f32)
fn rem_assign(&mut self, rhs: &f32)
%=
operation. Read moresource§impl<T: Unit<Scalar = f64>> RemAssign<&f64> for Size2<T>
impl<T: Unit<Scalar = f64>> RemAssign<&f64> for Size2<T>
source§fn rem_assign(&mut self, rhs: &f64)
fn rem_assign(&mut self, rhs: &f64)
%=
operation. Read moresource§impl<T: Unit<Scalar = i16>> RemAssign<&i16> for Size2<T>
impl<T: Unit<Scalar = i16>> RemAssign<&i16> for Size2<T>
source§fn rem_assign(&mut self, rhs: &i16)
fn rem_assign(&mut self, rhs: &i16)
%=
operation. Read moresource§impl<T: Unit<Scalar = i32>> RemAssign<&i32> for Size2<T>
impl<T: Unit<Scalar = i32>> RemAssign<&i32> for Size2<T>
source§fn rem_assign(&mut self, rhs: &i32)
fn rem_assign(&mut self, rhs: &i32)
%=
operation. Read moresource§impl<T: Unit<Scalar = i64>> RemAssign<&i64> for Size2<T>
impl<T: Unit<Scalar = i64>> RemAssign<&i64> for Size2<T>
source§fn rem_assign(&mut self, rhs: &i64)
fn rem_assign(&mut self, rhs: &i64)
%=
operation. Read moresource§impl<T: Unit<Scalar = u16>> RemAssign<&u16> for Size2<T>
impl<T: Unit<Scalar = u16>> RemAssign<&u16> for Size2<T>
source§fn rem_assign(&mut self, rhs: &u16)
fn rem_assign(&mut self, rhs: &u16)
%=
operation. Read moresource§impl<T: Unit<Scalar = u32>> RemAssign<&u32> for Size2<T>
impl<T: Unit<Scalar = u32>> RemAssign<&u32> for Size2<T>
source§fn rem_assign(&mut self, rhs: &u32)
fn rem_assign(&mut self, rhs: &u32)
%=
operation. Read moresource§impl<T: Unit<Scalar = u64>> RemAssign<&u64> for Size2<T>
impl<T: Unit<Scalar = u64>> RemAssign<&u64> for Size2<T>
source§fn rem_assign(&mut self, rhs: &u64)
fn rem_assign(&mut self, rhs: &u64)
%=
operation. Read moresource§impl<T: Unit<Scalar = f32>> RemAssign<f32> for Size2<T>
impl<T: Unit<Scalar = f32>> RemAssign<f32> for Size2<T>
source§fn rem_assign(&mut self, rhs: f32)
fn rem_assign(&mut self, rhs: f32)
%=
operation. Read moresource§impl<T: Unit<Scalar = f64>> RemAssign<f64> for Size2<T>
impl<T: Unit<Scalar = f64>> RemAssign<f64> for Size2<T>
source§fn rem_assign(&mut self, rhs: f64)
fn rem_assign(&mut self, rhs: f64)
%=
operation. Read moresource§impl<T: Unit<Scalar = i16>> RemAssign<i16> for Size2<T>
impl<T: Unit<Scalar = i16>> RemAssign<i16> for Size2<T>
source§fn rem_assign(&mut self, rhs: i16)
fn rem_assign(&mut self, rhs: i16)
%=
operation. Read moresource§impl<T: Unit<Scalar = i32>> RemAssign<i32> for Size2<T>
impl<T: Unit<Scalar = i32>> RemAssign<i32> for Size2<T>
source§fn rem_assign(&mut self, rhs: i32)
fn rem_assign(&mut self, rhs: i32)
%=
operation. Read moresource§impl<T: Unit<Scalar = i64>> RemAssign<i64> for Size2<T>
impl<T: Unit<Scalar = i64>> RemAssign<i64> for Size2<T>
source§fn rem_assign(&mut self, rhs: i64)
fn rem_assign(&mut self, rhs: i64)
%=
operation. Read moresource§impl<T: Unit<Scalar = u16>> RemAssign<u16> for Size2<T>
impl<T: Unit<Scalar = u16>> RemAssign<u16> for Size2<T>
source§fn rem_assign(&mut self, rhs: u16)
fn rem_assign(&mut self, rhs: u16)
%=
operation. Read moresource§impl<T: Unit<Scalar = u32>> RemAssign<u32> for Size2<T>
impl<T: Unit<Scalar = u32>> RemAssign<u32> for Size2<T>
source§fn rem_assign(&mut self, rhs: u32)
fn rem_assign(&mut self, rhs: u32)
%=
operation. Read moresource§impl<T: Unit<Scalar = u64>> RemAssign<u64> for Size2<T>
impl<T: Unit<Scalar = u64>> RemAssign<u64> for Size2<T>
source§fn rem_assign(&mut self, rhs: u64)
fn rem_assign(&mut self, rhs: u64)
%=
operation. Read moresource§impl<T: Unit> RemAssign for Size2<T>
impl<T: Unit> RemAssign for Size2<T>
source§fn rem_assign(&mut self, rhs: Size2<T>)
fn rem_assign(&mut self, rhs: Size2<T>)
%=
operation. Read moresource§impl<T: Unit> SubAssign<&Size2<T>> for Size2<T>
impl<T: Unit> SubAssign<&Size2<T>> for Size2<T>
source§fn sub_assign(&mut self, rhs: &Size2<T>)
fn sub_assign(&mut self, rhs: &Size2<T>)
-=
operation. Read moresource§impl<T: Unit<Scalar = f32>> SubAssign<&f32> for Size2<T>
impl<T: Unit<Scalar = f32>> SubAssign<&f32> for Size2<T>
source§fn sub_assign(&mut self, rhs: &f32)
fn sub_assign(&mut self, rhs: &f32)
-=
operation. Read moresource§impl<T: Unit<Scalar = f64>> SubAssign<&f64> for Size2<T>
impl<T: Unit<Scalar = f64>> SubAssign<&f64> for Size2<T>
source§fn sub_assign(&mut self, rhs: &f64)
fn sub_assign(&mut self, rhs: &f64)
-=
operation. Read moresource§impl<T: Unit<Scalar = i16>> SubAssign<&i16> for Size2<T>
impl<T: Unit<Scalar = i16>> SubAssign<&i16> for Size2<T>
source§fn sub_assign(&mut self, rhs: &i16)
fn sub_assign(&mut self, rhs: &i16)
-=
operation. Read moresource§impl<T: Unit<Scalar = i32>> SubAssign<&i32> for Size2<T>
impl<T: Unit<Scalar = i32>> SubAssign<&i32> for Size2<T>
source§fn sub_assign(&mut self, rhs: &i32)
fn sub_assign(&mut self, rhs: &i32)
-=
operation. Read moresource§impl<T: Unit<Scalar = i64>> SubAssign<&i64> for Size2<T>
impl<T: Unit<Scalar = i64>> SubAssign<&i64> for Size2<T>
source§fn sub_assign(&mut self, rhs: &i64)
fn sub_assign(&mut self, rhs: &i64)
-=
operation. Read moresource§impl<T: Unit<Scalar = u16>> SubAssign<&u16> for Size2<T>
impl<T: Unit<Scalar = u16>> SubAssign<&u16> for Size2<T>
source§fn sub_assign(&mut self, rhs: &u16)
fn sub_assign(&mut self, rhs: &u16)
-=
operation. Read moresource§impl<T: Unit<Scalar = u32>> SubAssign<&u32> for Size2<T>
impl<T: Unit<Scalar = u32>> SubAssign<&u32> for Size2<T>
source§fn sub_assign(&mut self, rhs: &u32)
fn sub_assign(&mut self, rhs: &u32)
-=
operation. Read moresource§impl<T: Unit<Scalar = u64>> SubAssign<&u64> for Size2<T>
impl<T: Unit<Scalar = u64>> SubAssign<&u64> for Size2<T>
source§fn sub_assign(&mut self, rhs: &u64)
fn sub_assign(&mut self, rhs: &u64)
-=
operation. Read moresource§impl<T: Unit<Scalar = f32>> SubAssign<f32> for Size2<T>
impl<T: Unit<Scalar = f32>> SubAssign<f32> for Size2<T>
source§fn sub_assign(&mut self, rhs: f32)
fn sub_assign(&mut self, rhs: f32)
-=
operation. Read moresource§impl<T: Unit<Scalar = f64>> SubAssign<f64> for Size2<T>
impl<T: Unit<Scalar = f64>> SubAssign<f64> for Size2<T>
source§fn sub_assign(&mut self, rhs: f64)
fn sub_assign(&mut self, rhs: f64)
-=
operation. Read moresource§impl<T: Unit<Scalar = i16>> SubAssign<i16> for Size2<T>
impl<T: Unit<Scalar = i16>> SubAssign<i16> for Size2<T>
source§fn sub_assign(&mut self, rhs: i16)
fn sub_assign(&mut self, rhs: i16)
-=
operation. Read moresource§impl<T: Unit<Scalar = i32>> SubAssign<i32> for Size2<T>
impl<T: Unit<Scalar = i32>> SubAssign<i32> for Size2<T>
source§fn sub_assign(&mut self, rhs: i32)
fn sub_assign(&mut self, rhs: i32)
-=
operation. Read moresource§impl<T: Unit<Scalar = i64>> SubAssign<i64> for Size2<T>
impl<T: Unit<Scalar = i64>> SubAssign<i64> for Size2<T>
source§fn sub_assign(&mut self, rhs: i64)
fn sub_assign(&mut self, rhs: i64)
-=
operation. Read moresource§impl<T: Unit<Scalar = u16>> SubAssign<u16> for Size2<T>
impl<T: Unit<Scalar = u16>> SubAssign<u16> for Size2<T>
source§fn sub_assign(&mut self, rhs: u16)
fn sub_assign(&mut self, rhs: u16)
-=
operation. Read moresource§impl<T: Unit<Scalar = u32>> SubAssign<u32> for Size2<T>
impl<T: Unit<Scalar = u32>> SubAssign<u32> for Size2<T>
source§fn sub_assign(&mut self, rhs: u32)
fn sub_assign(&mut self, rhs: u32)
-=
operation. Read moresource§impl<T: Unit<Scalar = u64>> SubAssign<u64> for Size2<T>
impl<T: Unit<Scalar = u64>> SubAssign<u64> for Size2<T>
source§fn sub_assign(&mut self, rhs: u64)
fn sub_assign(&mut self, rhs: u64)
-=
operation. Read moresource§impl<T: Unit> SubAssign for Size2<T>
impl<T: Unit> SubAssign for Size2<T>
source§fn sub_assign(&mut self, rhs: Size2<T>)
fn sub_assign(&mut self, rhs: Size2<T>)
-=
operation. Read moresource§impl<T: Unit> Swizzle<T> for Size2<T>
impl<T: Unit> Swizzle<T> for Size2<T>
source§fn swizzle2<const X: usize, const Y: usize>(&self) -> Vector2<T>
fn swizzle2<const X: usize, const Y: usize>(&self) -> Vector2<T>
source§impl<T: Unit> Transparent for Size2<T>
impl<T: Unit> Transparent for Size2<T>
source§impl<T: FloatUnit> UlpsEq for Size2<T>
impl<T: FloatUnit> UlpsEq for Size2<T>
source§impl<T: Unit> Vec2Swizzles for Size2<T>
impl<T: Unit> Vec2Swizzles for Size2<T>
type Vec3 = Size3<T>
type Vec4 = Vector4<T>
fn xx(self) -> Size2<T>
fn xy(self) -> Size2<T>
fn yy(self) -> Size2<T>
fn yx(self) -> Size2<T>
fn xxx(self) -> Size3<T>
fn xxy(self) -> Size3<T>
fn xyx(self) -> Size3<T>
fn xyy(self) -> Size3<T>
fn yxx(self) -> Size3<T>
fn yxy(self) -> Size3<T>
fn yyx(self) -> Size3<T>
fn yyy(self) -> Size3<T>
fn xxxx(self) -> Vector4<T>
fn xxxy(self) -> Vector4<T>
fn xxyx(self) -> Vector4<T>
fn xxyy(self) -> Vector4<T>
fn xyxx(self) -> Vector4<T>
fn xyxy(self) -> Vector4<T>
fn xyyx(self) -> Vector4<T>
fn xyyy(self) -> Vector4<T>
fn yxxx(self) -> Vector4<T>
fn yxxy(self) -> Vector4<T>
fn yxyx(self) -> Vector4<T>
fn yxyy(self) -> Vector4<T>
fn yyxx(self) -> Vector4<T>
fn yyxy(self) -> Vector4<T>
fn yyyx(self) -> Vector4<T>
fn yyyy(self) -> Vector4<T>
impl<T: Unit> Copy for Size2<T>
impl<T: Unit<Scalar: Eq>> Eq for Size2<T>
impl<T: Unit> Pod for Size2<T>
SAFETY: All members are Pod
, and we are #[repr(C)]
.
Auto Trait Implementations§
impl<U> Freeze for Size2<U>
impl<U> RefUnwindSafe for Size2<U>
impl<U> Send for Size2<U>
impl<U> Sync for Size2<U>
impl<U> Unpin for Size2<U>
impl<U> UnwindSafe for Size2<U>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)