Struct rfw_math::UVec2 [−][src]
#[repr(transparent)]pub struct UVec2(_);
Expand description
A 2-dimensional vector.
Implementations
Creates a vector from the elements in if_true
and if_false
, selecting which to use
for each element of self
.
A true element in the mask uses the corresponding element from if_true
, and false
uses the element from if_false
.
Returns a vector containing the mininum values for each element of self
and other
.
In other words this computes [self.x.max(other.x), self.y.max(other.y), ..]
.
Returns a vector containing the maximum values for each element of self
and other
.
In other words this computes [self.x.max(other.x), self.y.max(other.y), ..]
.
Component-wise clamping of values, similar to f32::clamp
.
Each element in min
must be less-or-equal to the corresponing element in max
.
Panics
Will panic if min
is greater than max
when glam_assert
is enabled.
Returns the horizontal minimum of self
.
In other words this computes min(x, y, ..)
.
Returns the horizontal maximum of self
.
In other words this computes max(x, y, ..)
.
Returns a vector mask containing the result of a ==
comparison for each element of
self
and other
.
In other words, this computes [self.x == other.x, self.y == other.y, ..]
for all
elements.
Returns a vector mask containing the result of a !=
comparison for each element of
self
and other
.
In other words this computes [self.x != other.x, self.y != other.y, ..]
for all
elements.
Returns a vector mask containing the result of a >=
comparison for each element of
self
and other
.
In other words this computes [self.x >= other.x, self.y >= other.y, ..]
for all
elements.
Returns a vector mask containing the result of a >
comparison for each element of
self
and other
.
In other words this computes [self.x > other.x, self.y > other.y, ..]
for all
elements.
Returns a vector mask containing the result of a <=
comparison for each element of
self
and other
.
In other words this computes [self.x <= other.x, self.y <= other.y, ..]
for all
elements.
Returns a vector mask containing the result of a <
comparison for each element of
self
and other
.
In other words this computes [self.x < other.x, self.y < other.y, ..]
for all
elements.
Creates a vector from the first N values in slice
.
Panics
Panics if slice
is less than N elements long.
Writes the elements of self
to the first N elements in slice
.
Panics
Panics if slice
is less than N elements long.
Trait Implementations
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Performs the /=
operation. Read more
Performs the /=
operation. Read more
Performs the *=
operation. Read more
Performs the *=
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Auto Trait Implementations
impl RefUnwindSafe for UVec2
impl UnwindSafe for UVec2
Blanket Implementations
Mutably borrows from an owned value. Read more