33 template<
typename Graph>
34 void operator()(Graph&
graph,
float canvas_width,
float canvas_height) {
35 float radius = std::min(canvas_width, canvas_height) * 0.333f;
36 float angle = 2.0f * 3.14159f /
graph.
nodes().size();
37 for (
unsigned i = 0; i <
graph.
nodes().size(); ++i) {
38 graph.
nodes()[i].pos().x = std::cos(i * angle) * radius;
39 graph.
nodes()[i].pos().y = std::sin(i * angle) * radius;