Struct rgeometry::data::Point[][src]

#[repr(transparent)]
pub struct Point<T, const N: usize> { pub array: [T; N], }

Fields

array: [T; N]

Implementations

impl<T: Clone, const N: usize> Point<T, N>[src]

pub fn new(array: [T; N]) -> Point<T, N>[src]

pub fn new_nn(array: [T; N]) -> Point<NotNan<T>, N> where
    T: Float
[src]

Panics

Panics if any of the inputs are NaN.

pub fn as_vec(&self) -> &Vector<T, N>[src]

pub fn cmp_distance_to(&self, p: &Point<T, N>, q: &Point<T, N>) -> Ordering where
    T: Clone + Zero + Ord + NumOps
[src]

pub fn squared_euclidean_distance(&self, rhs: &Point<T, N>) -> T where
    T: Clone + Zero + NumOps
[src]

pub fn zero() -> Self where
    T: Zero
[src]

pub fn cast<U, F>(self, f: F) -> Point<U, N> where
    F: Fn(T) -> U, 
[src]

impl<T> Point<T, 2>[src]

pub fn orientation(&self, q: &Point<T, 2>, r: &Point<T, 2>) -> Orientation where
    T: Clone + NumOps + Ord
[src]

pub fn ccw_cmp_around(&self, p: &Point<T, 2>, q: &Point<T, 2>) -> Ordering where
    T: Clone + Ord + NumOps + Zero + One + Neg<Output = T>, 
[src]

Docs?

pub fn ccw_cmp_around_with(
    &self,
    z: &Vector<T, 2>,
    p: &Point<T, 2>,
    q: &Point<T, 2>
) -> Ordering where
    T: Clone + Ord + NumOps + Neg<Output = T>, 
[src]

impl<T> Point<T, 1>[src]

pub fn x_coord(&self) -> &T[src]

impl<T> Point<T, 2>[src]

pub fn x_coord(&self) -> &T[src]

pub fn y_coord(&self) -> &T[src]

impl<T> Point<T, 3>[src]

pub fn x_coord(&self) -> &T[src]

pub fn y_coord(&self) -> &T[src]

pub fn z_coord(&self) -> &T[src]

Trait Implementations

impl<T, const N: usize> Add<&'_ Vector<T, N>> for Point<T, N> where
    &'a T: Add<&'a T, Output = T>, 
[src]

type Output = Point<T, N>

The resulting type after applying the + operator.

fn add(self: Point<T, N>, other: &Vector<T, N>) -> Self::Output[src]

Performs the + operation. Read more

impl<'a, 'b, T, const N: usize> Add<&'a Vector<T, N>> for &'b Point<T, N> where
    &'c T: Add<&'c T, Output = T>, 
[src]

type Output = Point<T, N>

The resulting type after applying the + operator.

fn add(self: &'b Point<T, N>, other: &'a Vector<T, N>) -> Self::Output[src]

Performs the + operation. Read more

impl<T, const N: usize> Add<Vector<T, N>> for Point<T, N> where
    &'a T: Add<&'a T, Output = T>, 
[src]

type Output = Point<T, N>

The resulting type after applying the + operator.

fn add(self: Point<T, N>, other: Vector<T, N>) -> Self::Output[src]

Performs the + operation. Read more

impl<T, const N: usize> AddAssign<&'_ Vector<T, N>> for Point<T, N> where
    T: AddAssign<&'a T>, 
[src]

fn add_assign(&mut self, other: &Vector<T, N>)[src]

Performs the += operation. Read more

impl<T, const N: usize> AddAssign<Vector<T, N>> for Point<T, N> where
    T: AddAssign<&'a T>, 
[src]

fn add_assign(&mut self, other: Vector<T, N>)[src]

Performs the += operation. Read more

impl<T: Clone, const N: usize> Clone for Point<T, N>[src]

fn clone(&self) -> Point<T, N>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: Debug, const N: usize> Debug for Point<T, N>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'a, const N: usize> From<&'a Point<Ratio<BigInt>, N>> for Point<f64, N>[src]

fn from(point: &Point<BigRational, N>) -> Point<f64, N>[src]

Performs the conversion.

impl<'a, T, const N: usize> From<&'a Point<T, N>> for &'a Vector<T, N>[src]

fn from(point: &Point<T, N>) -> &Vector<T, N>[src]

Performs the conversion.

impl<'a, T, const N: usize> From<&'a Point<T, N>> for VectorView<'a, T, N>[src]

fn from(point: &Point<T, N>) -> VectorView<'_, T, N>[src]

Performs the conversion.

impl<'a, const N: usize> From<&'a Point<f64, N>> for Point<BigRational, N>[src]

fn from(point: &Point<f64, N>) -> Point<BigRational, N>[src]

Performs the conversion.

impl<T, const N: usize> From<Point<T, N>> for Vector<T, N>[src]

fn from(point: Point<T, N>) -> Vector<T, N>[src]

Performs the conversion.

impl<T, const N: usize> From<Vector<T, N>> for Point<T, N>[src]

fn from(vector: Vector<T, N>) -> Point<T, N>[src]

Performs the conversion.

impl<T, const N: usize> Index<usize> for Point<T, N>[src]

type Output = T

The returned type after indexing.

fn index(&self, key: usize) -> &T[src]

Performs the indexing (container[index]) operation. Read more

impl<'a, 'b, T, const N: usize> Mul<&'b Point<T, N>> for &'a Transform<T, N> where
    T: TransformScalar, 
[src]

type Output = Point<T, N>

The resulting type after applying the * operator.

fn mul(self, other: &Point<T, N>) -> Point<T, N>[src]

Performs the * operation. Read more

impl<T, const N: usize> Mul<Point<T, N>> for Transform<T, N> where
    T: TransformScalar, 
[src]

type Output = Point<T, N>

The resulting type after applying the * operator.

fn mul(self, other: Point<T, N>) -> Point<T, N>[src]

Performs the * operation. Read more

impl<'a, T, const N: usize> Mul<Point<T, N>> for &'a Transform<T, N> where
    T: TransformScalar, 
[src]

type Output = Point<T, N>

The resulting type after applying the * operator.

fn mul(self, other: Point<T, N>) -> Point<T, N>[src]

Performs the * operation. Read more

impl<'a, 'b, T, const N: usize> Sub<&'a Point<T, N>> for &'b Point<T, N> where
    T: Sub<T, Output = T> + Clone
[src]

type Output = Vector<T, N>

The resulting type after applying the - operator.

fn sub(self: &'b Point<T, N>, other: &'a Point<T, N>) -> Self::Output[src]

Performs the - operation. Read more

impl<T, const N: usize> Sub<Point<T, N>> for Point<T, N> where
    T: Sub<T, Output = T> + Clone
[src]

type Output = Vector<T, N>

The resulting type after applying the - operator.

fn sub(self: Point<T, N>, other: Point<T, N>) -> Self::Output[src]

Performs the - operation. Read more

impl<'a, const N: usize> TryFrom<Point<f64, N>> for Point<NotNan<f64>, N>[src]

type Error = FloatIsNan

The type returned in the event of a conversion error.

fn try_from(point: Point<f64, N>) -> Result<Point<NotNan<f64>, N>, FloatIsNan>[src]

Performs the conversion.

impl<T: Copy, const N: usize> Copy for Point<T, N>[src]

Auto Trait Implementations

impl<T, const N: usize> RefUnwindSafe for Point<T, N> where
    T: RefUnwindSafe

impl<T, const N: usize> Send for Point<T, N> where
    T: Send

impl<T, const N: usize> Sync for Point<T, N> where
    T: Sync

impl<T, const N: usize> Unpin for Point<T, N> where
    T: Unpin

impl<T, const N: usize> UnwindSafe for Point<T, N> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<T, Rhs, Output> PolygonScalarRef<Rhs, Output> for T where
    T: Clone + NumOps<Rhs, Output>, 
[src]