Function nannou::geom::line::quad_corners [] [src]

pub fn quad_corners<S>(a: Point2<S>, b: Point2<S>, half_thickness: S) -> Quad<S> where
    S: BaseFloat

Given two points and half the line thickness, return the four corners of the rectangle describing the line.

Given a line a -> b, the indices are laid out as follows:

This example is not tested
0                                        2
 ----------------------------------------
 |a                                    b|
 ----------------------------------------
1                                        3