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