#[repr(C)]
pub struct Point2<S> {
pub x: S,
pub y: S,
}
Expand description
A point in 2-dimensional space.
This type is marked as #[repr(C)]
.
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.
Construct a new point where each component is the result of
applying the given operation to each pair of components of the
given points.
Component-wise casting to another type
Used for specifying relative comparisons.
The default tolerance to use when testing values that are close together. Read more
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers. Read more
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
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.
Whether all elements of the array are finite
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.
returns the smallest finite number this type can represent
returns the largest finite number this type can represent
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
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
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
The metric to be returned by the distance
function.
The distance between two values.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
The default relative tolerance for testing values that are far-apart. Read more
A test for equality that uses a relative comparison if the values are far apart.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
👎 Deprecated:
Use look_at_rh or look_at_lh
Create a transformation that rotates a vector to look at center
from
eye
, using up
for orientation. Read more
Create a transformation that rotates a vector to look at center
from
eye
, using up
for orientation. 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.
The default ULPs to tolerate when testing values that are far-apart. Read more
A test for equality that uses units in the last place (ULP) if the values are far apart.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Rem<Rhs, Output = Output> + Add<Rhs, Output = Output> + Sub<Rhs, Output = Output>,