Since the value 0.0 is frequently used as a default or minimum value, not allowing it would increase the chances of the game panicking.
Consider, for example, an animation that smoothly resizes a circle. When the circle appears, the radius increases from zero, and when the circle disappears, the radius decreases toward zero. Implementing this animation in v0.12 is simple, but v0.13 requires additional code to make the radius greater than zero to prevent panic.
What solution would you like?
That assertion should be circumradius >= 0.0 to allow zero.
Additional context
Bevy v0.12 can handle a circle of radius 0.0, but v0.13 panics.
What problem does this solve or what need does it fill?
It currently panics when
circumradius
is zero.https://github.com/bevyengine/bevy/blob/443ce9a62b6bb0136c192a6fe46e4c254a895e6c/crates/bevy_math/src/primitives/dim2.rs#L729
Is there any advantage to rejecting 0.0?
Since the value 0.0 is frequently used as a default or minimum value, not allowing it would increase the chances of the game panicking.
Consider, for example, an animation that smoothly resizes a circle. When the circle appears, the radius increases from zero, and when the circle disappears, the radius decreases toward zero. Implementing this animation in v0.12 is simple, but v0.13 requires additional code to make the radius greater than zero to prevent panic.
What solution would you like?
That assertion should be
circumradius >= 0.0
to allow zero.Additional context
Bevy v0.12 can handle a circle of radius 0.0, but v0.13 panics.