pub trait Vec4Ext {
// Required methods
fn trunc(self) -> Self;
fn step(self, value: Self) -> Self;
fn step_select(self, value: Self, true_: Self, false_: Self) -> Self;
fn fract(self) -> Self;
fn sqrt(self) -> Self;
fn to_bits(self) -> UVec4;
fn mean(self) -> f32;
fn has_equal_components(self, max_abs_diff: f32) -> bool;
}
Required Methods§
Sourcefn step(self, value: Self) -> Self
fn step(self, value: Self) -> Self
For element i
of the return value, returns 0.0 if value[i] < self[i]
and 1.0 otherwise.
Similar to glsl’s step(edge, x), which translates into edge.step(x)
Sourcefn step_select(self, value: Self, true_: Self, false_: Self) -> Self
fn step_select(self, value: Self, true_: Self, false_: Self) -> Self
Selects between true
and false
based on the result of value[i] < self[i]
Sourcefn has_equal_components(self, max_abs_diff: f32) -> bool
fn has_equal_components(self, max_abs_diff: f32) -> bool
Returns true if all components of the vector is the same within an absolute difference of max_abs_diff
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.