Struct nannou::prelude::Point2[][src]

#[repr(C)]
pub struct Point2<S> { pub x: S, pub y: S, }

A point in 2-dimensional space.

This type is marked as #[repr(C)].

Fields

Methods

impl<S> Point2<S>
[src]

Construct a new point, using the provided values.

Perform the given operation on each field in the point, returning a new point constructed from the operations.

impl<S> Point2<S> where
    S: Copy + NumCast
[src]

Component-wise casting to another type

Trait Implementations

impl<S> IndexMut<Range<usize>> for Point2<S>
[src]

Important traits for &'a [u8]

Performs the mutable indexing (container[index]) operation.

impl<S> IndexMut<RangeTo<usize>> for Point2<S>
[src]

Important traits for &'a [u8]

Performs the mutable indexing (container[index]) operation.

impl<S> IndexMut<RangeFull> for Point2<S>
[src]

Important traits for &'a [u8]

Performs the mutable indexing (container[index]) operation.

impl<S> IndexMut<RangeFrom<usize>> for Point2<S>
[src]

Important traits for &'a [u8]

Performs the mutable indexing (container[index]) operation.

impl<S> IndexMut<usize> for Point2<S>
[src]

Important traits for &'a mut R

Performs the mutable indexing (container[index]) operation.

impl<S> ElementWise<S> for Point2<S> where
    S: BaseNum
[src]

impl<S> ElementWise<Point2<S>> for Point2<S> where
    S: BaseNum
[src]

impl<S> Hash for Point2<S> where
    S: Hash
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<S> Sub<Point2<S>> for Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, S> Sub<Point2<S>> for &'a Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, 'b, S> Sub<&'a Point2<S>> for &'b Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, S> Sub<&'a Vector2<S>> for Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<S> Sub<Vector2<S>> for Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, S> Sub<&'a Point2<S>> for Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, 'b, S> Sub<&'a Vector2<S>> for &'b Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, S> Sub<Vector2<S>> for &'a Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<S> Clone for Point2<S> where
    S: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S> MulAssign<S> for Point2<S> where
    S: BaseNum + MulAssign<S>, 
[src]

Performs the *= operation.

impl<S> Debug for Point2<S> where
    S: Debug
[src]

Formats the value using the given formatter. Read more

impl<S> Serialize for Point2<S> where
    S: Serialize
[src]

Serialize this value into the given Serde serializer. Read more

impl<'de, S> Deserialize<'de> for Point2<S> where
    S: Deserialize<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl<'a> Mul<&'a Point2<i32>> for i32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<S> Mul<S> for Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, S> Mul<S> for &'a Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<isize>> for isize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Point2<u8>> for u8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<u16>> for u16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Point2<usize>> for usize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<usize>> for usize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Point2<i16>> for i16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Point2<isize>> for isize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Point2<f64>> for f64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Point2<i64>> for i64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<f32>> for f32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Point2<i8>> for i8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<u32>> for u32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<f64>> for f64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Point2<u16>> for u16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<u64>> for u64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<i64>> for i64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Point2<f32>> for f32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Point2<u32>> for u32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<i8>> for i8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Point2<u64>> for u64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<i32>> for i32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<i16>> for i16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Point2<u8>> for u8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<S> RemAssign<S> for Point2<S> where
    S: BaseNum + RemAssign<S>, 
[src]

Performs the %= operation.

impl<S> AsRef<[S; 2]> for Point2<S>
[src]

Performs the conversion.

impl<S> AsRef<(S, S)> for Point2<S>
[src]

Performs the conversion.

impl<S> AddAssign<Vector2<S>> for Point2<S> where
    S: BaseNum + AddAssign<S>, 
[src]

Performs the += operation.

impl<'a, S> From<&'a mut (S, S)> for &'a mut Point2<S>
[src]

Performs the conversion.

impl<'a, S> From<&'a (S, S)> for &'a Point2<S>
[src]

Performs the conversion.

impl<S> From<[S; 2]> for Point2<S> where
    S: Clone
[src]

Performs the conversion.

impl<'a, S> From<&'a [S; 2]> for &'a Point2<S>
[src]

Performs the conversion.

impl<'a, S> From<&'a mut [S; 2]> for &'a mut Point2<S>
[src]

Performs the conversion.

impl<S> From<(S, S)> for Point2<S>
[src]

Performs the conversion.

impl<S> Array for Point2<S> where
    S: BaseNum
[src]

Get the number of elements in the array type Read more

Construct a vector from a single value, replicating it. Read more

The sum of the elements of the array.

The product of the elements of the array.

Get the pointer to the first element of the array.

Get a mutable pointer to the first element of the array.

Swap the elements at indices i and j in-place.

impl<S> Into<[S; 2]> for Point2<S>
[src]

Performs the conversion.

impl<S> Into<(S, S)> for Point2<S>
[src]

Performs the conversion.

impl<S> ApproxEq for Point2<S> where
    S: BaseFloat
[src]

Used for specifying relative comparisons.

The default tolerance to use when testing values that are close together. Read more

The default relative tolerance for testing values that are far-apart. Read more

The default ULPs to tolerate when testing values that are far-apart. Read more

A test for equality that uses a relative comparison if the values are far apart.

A test for equality that uses units in the last place (ULP) if the values are far apart.

The inverse of ApproxEq::relative_eq.

The inverse of ApproxEq::ulps_eq.

impl<S> MetricSpace for Point2<S> where
    S: BaseFloat
[src]

The metric to be returned by the distance function.

Returns the squared distance. Read more

The distance between two values.

impl<S> Index<Range<usize>> for Point2<S>
[src]

The returned type after indexing.

Important traits for &'a [u8]

Performs the indexing (container[index]) operation.

impl<S> Index<usize> for Point2<S>
[src]

The returned type after indexing.

Important traits for &'a mut R

Performs the indexing (container[index]) operation.

impl<S> Index<RangeFull> for Point2<S>
[src]

The returned type after indexing.

Important traits for &'a [u8]

Performs the indexing (container[index]) operation.

impl<S> Index<RangeFrom<usize>> for Point2<S>
[src]

The returned type after indexing.

Important traits for &'a [u8]

Performs the indexing (container[index]) operation.

impl<S> Index<RangeTo<usize>> for Point2<S>
[src]

The returned type after indexing.

Important traits for &'a [u8]

Performs the indexing (container[index]) operation.

impl<'a, S> Add<&'a Vector2<S>> for Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a, S> Add<Vector2<S>> for &'a Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a, 'b, S> Add<&'a Vector2<S>> for &'b Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<S> Add<Vector2<S>> for Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<S> Transform<Point2<S>> for Matrix3<S> where
    S: BaseFloat
[src]

Create an identity transformation. That is, a transformation which does nothing. Read more

Create a transformation that rotates a vector to look at center from eye, using up for orientation. Read more

Transform a vector using this transform.

Transform a point using this transform.

Combine this transform with another, yielding a new transformation which has the effects of both. Read more

Create a transform that "un-does" this one.

Inverse transform a vector using this transform

Combine this transform with another, in-place.

impl<S> Bounded for Point2<S> where
    S: Bounded
[src]

returns the smallest finite number this type can represent

returns the largest finite number this type can represent

impl<'a> Rem<&'a Point2<i64>> for i64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Point2<u64>> for u64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Point2<i8>> for i8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Point2<u8>> for u8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a, S> Rem<S> for &'a Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Point2<i16>> for i16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<i32>> for i32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Point2<usize>> for usize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<u8>> for u8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Point2<u32>> for u32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<f32>> for f32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<f64>> for f64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<S> Rem<S> for Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Point2<f32>> for f32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<u32>> for u32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<u16>> for u16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<i16>> for i16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Point2<u16>> for u16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<usize>> for usize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<i8>> for i8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Point2<isize>> for isize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Point2<i32>> for i32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<i64>> for i64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<u64>> for u64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Point2<f64>> for f64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Point2<isize>> for isize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<S> EuclideanSpace for Point2<S> where
    S: BaseNum
[src]

The associated scalar over which the space is defined. Read more

The associated space of displacement vectors.

The point at the origin of the Euclidean space.

Convert a displacement vector to a point. Read more

Convert a point to a displacement vector. Read more

This is a weird one, but its useful for plane calculations.

Returns the middle point between two other points. Read more

Returns the average position of all points in the slice. Read more

impl<S> SubAssign<Vector2<S>> for Point2<S> where
    S: BaseNum + SubAssign<S>, 
[src]

Performs the -= operation.

impl<S> AsMut<(S, S)> for Point2<S>
[src]

Performs the conversion.

impl<S> AsMut<[S; 2]> for Point2<S>
[src]

Performs the conversion.

impl<S> DivAssign<S> for Point2<S> where
    S: BaseNum + DivAssign<S>, 
[src]

Performs the /= operation.

impl<S> Copy for Point2<S> where
    S: Copy
[src]

impl<S> Eq for Point2<S> where
    S: Eq
[src]

impl<S> PartialEq<Point2<S>> for Point2<S> where
    S: PartialEq<S>, 
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Div<&'a Point2<i32>> for i32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<i64>> for i64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Point2<i8>> for i8
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<i16>> for i16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<u16>> for u16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Point2<isize>> for isize
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<f64>> for f64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<isize>> for isize
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a, S> Div<S> for &'a Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Point2<u32>> for u32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<usize>> for usize
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Point2<u16>> for u16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Point2<f64>> for f64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Point2<u64>> for u64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<u64>> for u64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<i8>> for i8
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Point2<usize>> for usize
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<u8>> for u8
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<S> Div<S> for Point2<S> where
    S: BaseNum
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<f32>> for f32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<u32>> for u32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Point2<i16>> for i16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Point2<i64>> for i64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Point2<f32>> for f32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Point2<u8>> for u8
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Point2<i32>> for i32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<S> Rotation<Point2<S>> for Basis2<S> where
    S: BaseFloat
[src]

Create a rotation to a given direction with an 'up' vector.

Create a shortest rotation to transform vector 'a' into 'b'. Both given vectors are assumed to have unit length. Read more

Rotate a vector using this rotation.

Create a new rotation which "un-does" this rotation. That is, r * r.invert() is the identity. Read more

Rotate a point using this rotation, by converting it to its representation as a vector. Read more

impl<S> IntoPoint<S> for Point2<S> where
    S: BaseFloat
[src]

Convert self into a Point.

impl<S> Vertex for Point2<S> where
    S: BaseNum
[src]

The values used to describe the vertex position.

impl<S> Vertex2d for Point2<S> where
    S: BaseNum
[src]

The x, y location of the vertex.

Auto Trait Implementations

impl<S> Send for Point2<S> where
    S: Send

impl<S> Sync for Point2<S> where
    S: Sync