Struct adivon::primitive::Point2D
[−]
[src]
pub struct Point2D { pub x: f64, pub y: f64, }
Fields
x: f64
y: f64
Methods
impl Point2D
[src]
fn new(x: f64, y: f64) -> Point2D
fn distance_to<T: Borrow<Point2D>>(&self, that: T) -> f64
fn distance_squared_to<T: Borrow<Point2D>>(&self, that: T) -> f64
Trait Implementations
impl Clone for Point2D
[src]
fn clone(&self) -> Point2D
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 Copy for Point2D
[src]
impl PartialEq for Point2D
[src]
fn eq(&self, __arg_0: &Point2D) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Point2D) -> bool
This method tests for !=
.
impl PartialOrd for Point2D
[src]
fn partial_cmp(&self, __arg_0: &Point2D) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Point2D) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Point2D) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Point2D) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Point2D) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Debug for Point2D
[src]
impl Display for Point2D
[src]
impl Rand for Point2D
[src]
fn rand<R: Rng>(rng: &mut R) -> Self
Generates a random instance of this type using the specified source of randomness. Read more