Skip to main content

hexagon_vertices

Function hexagon_vertices 

Source
pub fn hexagon_vertices(cx: f64, cy: f64, size: f64) -> [(f64, f64); 6]
Expand description

Computes the 6 vertices of a flat-top regular hexagon centered at (cx, cy) with the given circumradius size.

Vertices are returned in counter-clockwise order starting from the rightmost point (angle = 0).