Struct euclid::point::Point2D
[−]
[src]
pub struct Point2D<T> { pub x: T, pub y: T, }
Fields
x: T
y: T
Methods
impl<T: Zero> Point2D<T>
[src]
impl<T> Point2D<T>
[src]
impl<T: Copy + Add<T, Output=T>> Point2D<T>
[src]
impl<Unit, T: Clone> Point2D<Length<Unit, T>>
[src]
fn typed(x: T, y: T) -> TypedPoint2D<Unit, T>
fn to_untyped(&self) -> Point2D<T>
Drop the units, preserving only the numeric value.
fn from_untyped(p: &Point2D<T>) -> TypedPoint2D<Unit, T>
Tag a unitless value with units.
impl<Unit, T0: NumCast + Clone> Point2D<Length<Unit, T0>>
[src]
fn cast<T1: NumCast + Clone>(&self) -> Option<Point2D<Length<Unit, T1>>>
Cast from one numeric representation to another, preserving the units.
impl<Unit, T: NumCast + Clone> Point2D<Length<Unit, T>>
[src]
Trait Implementations
impl<T: PartialEq> PartialEq for Point2D<T>
[src]
fn eq(&self, __arg_0: &Point2D<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Point2D<T>) -> bool
This method tests for !=
.
impl<T: Hash> Hash for Point2D<T>
[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl<T: Eq> Eq for Point2D<T>
[src]
impl<T: Encodable> Encodable for Point2D<T>
[src]
impl<T: Decodable> Decodable for Point2D<T>
[src]
impl<T: Copy> Copy for Point2D<T>
[src]
impl<T: Clone> Clone for Point2D<T>
[src]
fn clone(&self) -> Point2D<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Point2D<T>
[src]
impl<T: Display> Display for Point2D<T>
[src]
impl<T: Clone + Add<T, Output=T>> Add for Point2D<T>
[src]
type Output = Point2D<T>
The resulting type after applying the +
operator
fn add(self, other: Point2D<T>) -> Point2D<T>
The method for the +
operator
impl<T: Clone + Add<T, Output=T>> Add<Size2D<T>> for Point2D<T>
[src]
type Output = Point2D<T>
The resulting type after applying the +
operator
fn add(self, other: Size2D<T>) -> Point2D<T>
The method for the +
operator
impl<T: Clone + Sub<T, Output=T>> Sub for Point2D<T>
[src]
type Output = Point2D<T>
The resulting type after applying the -
operator
fn sub(self, other: Point2D<T>) -> Point2D<T>
The method for the -
operator
impl<T: Clone + Neg<Output=T>> Neg for Point2D<T>
[src]
type Output = Point2D<T>
The resulting type after applying the -
operator
fn neg(self) -> Point2D<T>
The method for the unary -
operator
impl<Scale: Copy, T0: Mul<Scale, Output=T1>, T1: Clone> Mul<Scale> for Point2D<T0>
[src]
type Output = Point2D<T1>
The resulting type after applying the *
operator
fn mul(self, scale: Scale) -> Point2D<T1>
The method for the *
operator