Struct rustml::geometry::Point2D [] [src]

pub struct Point2D<T> {
    pub x: T,
    pub y: T,
}

A point with two dimensions, x and y.

Fields

x

The first dimension of the point.

y

The second dimension of the point.

Methods

impl<T> Point2D<T>

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

Creates a new point with two dimensions.

Trait Implementations

impl DistancePoint2D<f32> for Point2D<f32>

fn euclid(&self, other: &Point2D<f32>) -> f32

impl DistancePoint2D<f64> for Point2D<f64>

fn euclid(&self, other: &Point2D<f64>) -> f64

impl<T: Display + Clone> Display for Point2D<T>

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