The size closest to (x, y) that satisfies these constraints.
x
y
Vector2 constrain(double x, double y) => .new( x.clamp(min.x, max.x).toDouble(), y.clamp(min.y, max.y).toDouble(), );