Skip to main content

Point2f

Type Alias Point2f 

Source
pub type Point2f = Point2<Length>;

Aliased Type§

pub struct Point2f {
    pub x: Length,
    pub y: Length,
}

Fields§

§x: Length§y: Length

Trait Implementations§

Source§

impl PlanPoint for Point2f

Source§

type Set = Point2Soa<Length, MAX_NODES>

Storage for up to MAX_NODES of these points.
Source§

fn distance(self, other: Self) -> Length

Euclidean distance to other.
Source§

fn lerp(self, other: Self, ratio: Ratio) -> Self

The point at ratio of the way toward other. Ratio 0 returns self, ratio 1 returns other.
Source§

fn project(a: Self, b: Self, p: Self) -> (Area, Area)

((p - a) . (b - a), |b - a|^2), the two products the point-to-segment distance needs. Both are areas; their quotient is the projection parameter along the segment.