Trait Vector2DExt

Source
pub trait Vector2DExt {
    // Required methods
    fn size(self) -> f32;
    fn size_squared(self) -> f32;
    fn is_nearly_zero(self, tolerance: f32) -> bool;
}
Expand description

Extension trait for Vector2D operations

Required Methods§

Source

fn size(self) -> f32

Get the size (magnitude) of the 2D vector

Source

fn size_squared(self) -> f32

Get the squared size (magnitude squared)

Source

fn is_nearly_zero(self, tolerance: f32) -> bool

Check if the vector is nearly zero

Implementors§