Struct rusttype::Point [−][src]
pub struct Point<N> {
pub x: N,
pub y: N,
}
Expand description
A point in 2-dimensional space, with each dimension of type N
.
Legal operations on points are addition and subtraction by vectors, and subtraction between points, to give a vector representing the offset between the two points. Combined with the legal operations on vectors, meaningful manipulations of vectors and points can be performed.
For example, to interpolate between two points by a factor t
:
let interpolated_point = p0 + (p1 - p0) * t;
Fields
x: N
y: N
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<N> RefUnwindSafe for Point<N> where
N: RefUnwindSafe,
impl<N> UnwindSafe for Point<N> where
N: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more