Struct rasterize::Point [−][src]
Value representing a 2D point or vector.
Implementations
impl Point
[src]
impl Point
[src]pub fn new(x: Scalar, y: Scalar) -> Self
[src]
pub fn x(self) -> Scalar
[src]
Get x
component of the point
pub fn y(self) -> Scalar
[src]
Get y
compenent of the point
pub fn length(self) -> Scalar
[src]
Get length of the vector (distance from the origin)
pub fn dist(self, other: Self) -> Scalar
[src]
Distance between two points
pub fn dot(self, other: Self) -> Scalar
[src]
Dot product between two vectors
pub fn cross(self, other: Self) -> Scalar
[src]
Cross product between two vectors
pub fn normal(self) -> Point
[src]
Get vector normal (not a unit sized)
pub fn normalize(self) -> Option<Point>
[src]
Convert vector to a unit size vector, if length is not zero
pub fn angle_between(self, other: Self) -> Option<Scalar>
[src]
Calculate angle (from self to the other) between two vectors
pub fn cos_between(self, other: Self) -> Option<Scalar>
[src]
Cosine of the angle (from self to the other) between to vectors
pub fn sin_between(self, other: Self) -> Option<Scalar>
[src]
Sine of the angle (from self to the other) between to vectors
pub fn is_close_to(self, other: Point) -> bool
[src]
Determine if self is close to the other within the marging of error (EPSILON)
Trait Implementations
impl StructuralPartialEq for Point
[src]
impl StructuralPartialEq for Point
[src]Auto Trait Implementations
impl RefUnwindSafe for Point
impl RefUnwindSafe for Point
impl UnwindSafe for Point
impl UnwindSafe for Point