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]

fn zero() -> Point2D<T>

impl<T> Point2D<T>
[src]

fn new(x: T, y: T) -> Point2D<T>

impl<T: Mul<T, Output=T> + Add<T, Output=T> + Sub<T, Output=T> + Copy> Point2D<T>
[src]

fn dot(self, other: Point2D<T>) -> T

fn cross(self, other: Point2D<T>) -> T

impl<T: Copy + Add<T, Output=T>> Point2D<T>
[src]

fn add_size(&self, other: &Size2D<T>) -> Point2D<T>

impl<T: Float> Point2D<T>
[src]

fn min(self, other: Point2D<T>) -> Point2D<T>

fn max(self, other: Point2D<T>) -> Point2D<T>

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]

fn as_f32(&self) -> Point2D<Length<Unit, f32>>

fn as_uint(&self) -> Point2D<Length<Unit, usize>>

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]

fn encode<__ST: Encoder>(&self, __arg_0: &mut __ST) -> Result<(), __ST::Error>

impl<T: Decodable> Decodable for Point2D<T>
[src]

fn decode<__DT: Decoder>(__arg_0: &mut __DT) -> Result<Point2D<T>, __DT::Error>

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]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: Display> Display for Point2D<T>
[src]

fn fmt(&self, formatter: &mut Formatter) -> Result

Formats the value using the given formatter.

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

impl<Scale: Copy, T0: Div<Scale, Output=T1>, T1: Clone> Div<Scale> for Point2D<T0>
[src]

type Output = Point2D<T1>

The resulting type after applying the / operator

fn div(self, scale: Scale) -> Point2D<T1>

The method for the / operator