pub struct Point {
pub x: f64,
pub y: f64,
}Fields§
§x: f64§y: f64Implementations§
Source§impl Point
impl Point
pub fn dot(&self, other: Self) -> f64
pub fn perp(&self, other: Self) -> f64
pub fn norm(&self) -> f64
pub fn normalize(&self) -> (Point, f64)
pub fn almost_eq(&self, other: Self, ulp: i64) -> bool
pub fn close_enough(&self, other: Self, eps: f64) -> bool
pub fn diff_of_prod(&self, a: f64, other: Point, b: f64) -> Point
pub fn sum_of_prod(&self, a: f64, other: Point, b: f64) -> Point
pub fn lerp(self, other: Point, t: f64) -> Point
pub fn sort_parallel_points( a: Point, b: Point, c: Point, d: Point, ) -> (Point, Point, Point, Point)
Trait Implementations§
Source§impl PartialOrd for Point
impl PartialOrd for Point
impl Copy for Point
impl StructuralPartialEq for Point
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
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