Struct pathfinder_geometry::unit_vector::UnitVector
source · pub struct UnitVector(pub Vector2F);
Tuple Fields§
§0: Vector2F
Implementations§
source§impl UnitVector
impl UnitVector
pub fn from_angle(theta: f32) -> UnitVector
sourcepub fn rotate_by(&self, other: UnitVector) -> UnitVector
pub fn rotate_by(&self, other: UnitVector) -> UnitVector
Angle addition formula.
sourcepub fn rev_rotate_by(&self, other: UnitVector) -> UnitVector
pub fn rev_rotate_by(&self, other: UnitVector) -> UnitVector
Angle subtraction formula.
sourcepub fn halve_angle(&self) -> UnitVector
pub fn halve_angle(&self) -> UnitVector
Half angle formula.
Trait Implementations§
source§impl Clone for UnitVector
impl Clone for UnitVector
source§fn clone(&self) -> UnitVector
fn clone(&self) -> UnitVector
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UnitVector
impl Debug for UnitVector
impl Copy for UnitVector
Auto Trait Implementations§
impl Freeze for UnitVector
impl RefUnwindSafe for UnitVector
impl Send for UnitVector
impl Sync for UnitVector
impl Unpin for UnitVector
impl UnwindSafe for UnitVector
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more