pub trait VectorExt {
// Required methods
fn size(self) -> f32;
fn size_squared(self) -> f32;
fn is_nearly_zero(self, tolerance: f32) -> bool;
fn is_normalized(self) -> bool;
fn get_safe_normal(self, tolerance: f32) -> Vector;
}Expand description
Extension trait for Vector operations common in UE
Required Methods§
Sourcefn size_squared(self) -> f32
fn size_squared(self) -> f32
Get the squared size (magnitude squared) - faster than size()
Sourcefn is_nearly_zero(self, tolerance: f32) -> bool
fn is_nearly_zero(self, tolerance: f32) -> bool
Check if the vector is nearly zero
Sourcefn is_normalized(self) -> bool
fn is_normalized(self) -> bool
Check if the vector is normalized (unit length)
Sourcefn get_safe_normal(self, tolerance: f32) -> Vector
fn get_safe_normal(self, tolerance: f32) -> Vector
Get a normalized copy of the vector