Struct rgeometry::data::Point [−][src]
Fields
array: [T; N]
Implementations
Determine the direction you have to turn if you walk from p1
to p2
to p3
.
For fixed-precision types (i8,i16,i32,i64,etc), this function is guaranteed to work for any input and never cause any arithmetic overflows.
Examples
let p1 = Point::new([ 0, 0 ]); let p2 = Point::new([ 0, 1 ]); // One unit above p1. // (0,0) -> (0,1) -> (0,2) == Orientation::CoLinear assert!(Point::orient(&p1, &p2, &Point::new([ 0, 2 ])).is_colinear()); // (0,0) -> (0,1) -> (-1,2) == Orientation::CounterClockWise assert!(Point::orient(&p1, &p2, &Point::new([ -1, 2 ])).is_ccw()); // (0,0) -> (0,1) -> (1,2) == Orientation::ClockWise assert!(Point::orient(&p1, &p2, &Point::new([ 1, 2 ])).is_cw());Run
pub fn orient_along_vector(
p1: &Point<T, 2>,
vector: &Vector<T, 2>,
p2: &Point<T, 2>
) -> Orientation
Docs?
Trait Implementations
Performs the +=
operation. Read more
Performs the +=
operation. Read more
impl<T, const N: usize> Distribution<Point<T, N>> for Standard where
Standard: Distribution<T>,
impl<T, const N: usize> Distribution<Point<T, N>> for Standard where
Standard: Distribution<T>,
Generate a random value of T
, using rng
as the source of randomness.
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
Performs the conversion.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<T, const N: usize> RefUnwindSafe for Point<T, N> where
T: RefUnwindSafe,
impl<T, const N: usize> UnwindSafe for Point<T, N> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V