pub struct Point<F> {
pub x: F,
pub y: F,
pub z: F,
}
Fields§
§x: F
§y: F
§z: F
Implementations§
source§impl<F: Float + FloatConst> Point<F>
impl<F: Float + FloatConst> Point<F>
sourcepub fn distance_to(&self, pt: &Point<F>) -> F
pub fn distance_to(&self, pt: &Point<F>) -> F
Calculates distance to another Point.
sourcepub fn normalized(&self) -> Point<F>
pub fn normalized(&self) -> Point<F>
Normalize coordinates of the Point.
Trait Implementations§
source§impl<F: Ord> Ord for Point<F>
impl<F: Ord> Ord for Point<F>
source§impl<F: PartialEq> PartialEq<Point<F>> for Point<F>
impl<F: PartialEq> PartialEq<Point<F>> for Point<F>
source§impl<F: PartialOrd> PartialOrd<Point<F>> for Point<F>
impl<F: PartialOrd> PartialOrd<Point<F>> for Point<F>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more