Struct voronoi::Point
[−]
[src]
pub struct Point { pub x: OrderedFloat<f64>, pub y: OrderedFloat<f64>, }
A point in two dimensions
Fields
x: OrderedFloat<f64>
x coordinate
y: OrderedFloat<f64>
y coordinate
Methods
impl Point
[src]
fn new(x: f64, y: f64) -> Self
[src]
Constructs a new Point
.
fn x(&self) -> f64
[src]
Getter for the x coordinate.
fn y(&self) -> f64
[src]
Getter for the y coordinate.
impl Point
[src]
fn cross(self, rhs: Point) -> f64
[src]
Computes the cross product of two points, viewed as vectors from the origin.
fn dot(self, rhs: Point) -> f64
[src]
Computes the dot product of two points, viewed as vectors from the origin.
Trait Implementations
impl Clone for Point
[src]
fn clone(&self) -> Point
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Point
[src]
impl PartialEq for Point
[src]
fn eq(&self, __arg_0: &Point) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Point) -> bool
[src]
This method tests for !=
.
impl Eq for Point
[src]
impl Debug for Point
[src]
impl Rand for Point
[src]
fn rand<R: Rng>(rng: &mut R) -> Point
[src]
Generates a random instance of this type using the specified source of randomness. Read more
impl Mul<f64> for Point
[src]
type Output = Point
The resulting type after applying the *
operator.
fn mul(self, _rhs: f64) -> Point
[src]
Performs the *
operation.
impl Sub<Point> for Point
[src]
type Output = Point
The resulting type after applying the -
operator.
fn sub(self, _rhs: Point) -> Point
[src]
Performs the -
operation.
impl Add<Point> for Point
[src]
type Output = Point
The resulting type after applying the +
operator.
fn add(self, _rhs: Point) -> Point
[src]
Performs the +
operation.
impl PartialOrd for Point
[src]
fn partial_cmp(&self, other: &Point) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Point
[src]
fn cmp(&self, other: &Point) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more