Struct glam::i32::IVec2 [−][src]
#[repr(transparent)]pub struct IVec2(_);
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.
Returns a vector containing the absolute value of each element of self
.
Returns a vector with elements representing the sign of self
.
1.0
if the number is positive,+0.0
orINFINITY
-1.0
if the number is negative,-0.0
orNEG_INFINITY
NAN
if the number isNAN
The perpendicular dot product of self
and other
.
Also known as the wedge product, 2d cross product, and determinant.
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 IVec2
impl UnwindSafe for IVec2
Blanket Implementations
Mutably borrows from an owned value. Read more