projectVertices static method
Implementation
static ({double min, double max}) projectVertices(
List<Vector2> vertices,
Vector2 axis,
) {
double min = double.maxFinite;
double max = -double.maxFinite;
for (var v in vertices) {
double proj = v.dot(axis);
if (proj < min) {
min = proj;
}
if (proj > max) {
max = proj;
}
}
return (min: min, max: max);
}