[−][src]Struct aljabar::Point
A point in space.
Points are far less flexible and useful than vectors and are used to express the purpose or meaning of a variable through its type.
Points can be moved through space by adding or subtracting vectors from them.
The only mathematical operator supported between two points is subtraction, which results in the vector between the two points.
Points can be freely converted to and from vectors via From
.
Implementations
impl<T, const N: usize> Point<T, { N }>
[src]
pub fn from_vec(v: Vector<T, { N }>) -> Self
[src]
Convenience method for converting from vector.
pub fn to_vec(self) -> Vector<T, { N }>
[src]
Convenience method for converting from vector.
impl<T, const N: usize> Point<T, { N }> where
T: Clone,
[src]
T: Clone,
pub fn x(&self) -> T
[src]
pub fn y(&self) -> T
[src]
pub fn z(&self) -> T
[src]
pub fn w(&self) -> T
[src]
Trait Implementations
impl<A, B, const N: usize> Add<Vector<B, N>> for Point<A, { N }> where
A: Add<B>,
[src]
A: Add<B>,
type Output = Point<<A as Add<B>>::Output, { N }>
The resulting type after applying the +
operator.
fn add(self, rhs: Vector<B, { N }>) -> Self::Output
[src]
impl<T, const N: usize> Clone for Point<T, { N }> where
T: Clone,
[src]
T: Clone,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T, const N: usize> Copy for Point<T, { N }> where
T: Copy,
[src]
T: Copy,
impl<T, const N: usize> Debug for Point<T, { N }> where
T: Debug,
[src]
T: Debug,
impl<T, const N: usize> Deref for Point<T, { N }>
[src]
impl<T, const N: usize> DerefMut for Point<T, { N }>
[src]
impl<'de, T, const N: usize> Deserialize<'de> for Point<T, { N }> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl<T, const N: usize> Distribution<Point<T, N>> for Standard where
Standard: Distribution<T>,
[src]
Standard: Distribution<T>,
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Point<T, { N }>
[src]
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
[src]
R: Rng,
impl<T, const N: usize> Eq for Point<T, { N }> where
T: Eq,
[src]
T: Eq,
impl<T, const N: usize> From<[T; N]> for Point<T, { N }>
[src]
impl<T, const N: usize> From<Vector<T, N>> for Point<T, { N }>
[src]
impl<T, const N: usize> Hash for Point<T, { N }> where
T: Hash,
[src]
T: Hash,
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T, const N: usize> Into<[T; N]> for Point<T, { N }>
[src]
impl<T, const N: usize> IntoIterator for Point<T, { N }>
[src]
type Item = T
The type of the elements being iterated over.
type IntoIter = ArrayIter<T, { N }>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<A, B, RHS, const N: usize> PartialEq<RHS> for Point<A, { N }> where
RHS: Deref<Target = [B; N]>,
A: PartialEq<B>,
[src]
RHS: Deref<Target = [B; N]>,
A: PartialEq<B>,
impl<T, const N: usize> Serialize for Point<T, { N }> where
T: Serialize,
[src]
T: Serialize,
impl<A, B, const N: usize> Sub<Point<B, N>> for Point<A, { N }> where
A: Sub<B>,
[src]
A: Sub<B>,
type Output = Vector<<A as Sub<B>>::Output, { N }>
The resulting type after applying the -
operator.
fn sub(self, rhs: Point<B, { N }>) -> Self::Output
[src]
impl<A, B, const N: usize> Sub<Vector<B, N>> for Point<A, { N }> where
A: Sub<B>,
[src]
A: Sub<B>,
Auto Trait Implementations
impl<T, const N: usize> RefUnwindSafe for Point<T, N> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, const N: usize> Send for Point<T, N> where
T: Send,
T: Send,
impl<T, const N: usize> Sync for Point<T, N> where
T: Sync,
T: Sync,
impl<T, const N: usize> Unpin for Point<T, N> where
T: Unpin,
T: Unpin,
impl<T, const N: usize> UnwindSafe for Point<T, N> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,