Macro let_engine::make_circle
source · macro_rules! make_circle { ($corners:expr) => { ... }; ($corners:expr, $percent:expr) => { ... }; }
Expand description
A macro that makes it easy to create circles.
Returns Data with vertices and indices.
Using this with a u32 makes a circle fan with as many corners as given.
Using this with a u32 and a f64 makes a circle fan that looks like a pie with the given percentage missing.
§usage:
use let_engine::prelude::*;
let hexagon: Data = make_circle!(6); // Makes a hexagon.
let pie: Data = make_circle!(20, 0.75); // Makes a pie circle fan with 20 edges with the top right part missing a quarter piece.