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]

[src]

Construct a new point, using the provided values.

[src]

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]

[src]

Component-wise casting to another type

Trait Implementations

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

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

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

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

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

The resulting type after applying the - operator.

[src]

Performs the - operation.

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

The resulting type after applying the - operator.

[src]

Performs the - operation.

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

The resulting type after applying the - operator.

[src]

Performs the - operation.

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

The resulting type after applying the - operator.

[src]

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.

[src]

Performs the - operation.

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

The resulting type after applying the - operator.

[src]

Performs the - operation.

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

The resulting type after applying the - operator.

[src]

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.

[src]

Performs the - operation.

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

Important traits for &'a mut [u8]
[src]

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

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

Important traits for &'a mut W
[src]

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

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

Important traits for &'a mut [u8]
[src]

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

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

Important traits for &'a mut [u8]
[src]

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

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

Important traits for &'a mut [u8]
[src]

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

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

Used for specifying relative comparisons.

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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<'a> Mul<&'a Point2<i16>> for i16
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

[src]

Performs the %= operation.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the += operation.

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

[src]

Performs the *= operation.

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

[src]

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

[src]

This method tests for !=.

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

The resulting type after applying the + operator.

[src]

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.

[src]

Performs the + operation.

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

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

[src]

Get the number of elements in the array type Read more

[src]

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

[src]

The sum of the elements of the array.

[src]

The product of the elements of the array.

[src]

Get the pointer to the first element of the array.

[src]

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

[src]

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

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

The returned type after indexing.

Important traits for &'a mut [u8]
[src]

Performs the indexing (container[index]) operation.

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

The returned type after indexing.

Important traits for &'a mut [u8]
[src]

Performs the indexing (container[index]) operation.

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

The returned type after indexing.

Important traits for &'a mut [u8]
[src]

Performs the indexing (container[index]) operation.

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

The returned type after indexing.

Important traits for &'a mut W
[src]

Performs the indexing (container[index]) operation.

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

The returned type after indexing.

Important traits for &'a mut [u8]
[src]

Performs the indexing (container[index]) operation.

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

The metric to be returned by the distance function.

[src]

Returns the squared distance. Read more

[src]

The distance between two values.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

returns the smallest finite number this type can represent

[src]

returns the largest finite number this type can represent

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

[src]

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

[src]

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

[src]

Transform a vector using this transform.

[src]

Transform a point using this transform.

[src]

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

[src]

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

[src]

Inverse transform a vector using this transform

[src]

Combine this transform with another, in-place.

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.

[src]

The point at the origin of the Euclidean space.

[src]

Convert a displacement vector to a point. Read more

[src]

Convert a point to a displacement vector. Read more

[src]

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

[src]

Returns the middle point between two other points. Read more

[src]

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]

[src]

Performs the -= operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

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

[src]

Performs the /= operation.

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

[src]

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

1.3.0
[src]

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

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Deserialize this value from the given Serde deserializer. Read more

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

[src]

Serialize this value into the given Serde serializer. Read more

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

[src]

Formats the value using the given formatter. Read more

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

[src]

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

[src]

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

[src]

Rotate a vector using this rotation.

[src]

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

[src]

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]

[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]

[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