Function lyon::tessellation::math_utils::compute_normal
[−]
[src]
pub fn compute_normal(e1: TypedPoint2D<f32, UnknownUnit>,
e2: TypedPoint2D<f32, UnknownUnit>)
-> TypedPoint2D<f32, UnknownUnit>
Compute a normal vector at a point P such that x ---e1----> P ---e2---> x
The resulting vector is not normalized. The length is such that extruding the shape would yield parallel segments exactly 1 unit away from their original. (useful for generating strokes and vertex-aa). The normal points towards the left side of e1.