Closed dmbaker closed 3 years ago
Commit 022eb07 agrees with this issue and applies a fix as suggested.
Alternatively, you could use the modulo operator and avoid the risk of raising an error completely:
azi %= 360
That's semantically quite different - one (the error) signals that the input is probably bad, while the other silently accepts it.
It's not wrong, it's just not good practice. Could give a warning rather than breaking since it's a shame to waste some good compute?
Personally I think the right choice is to fail, and require data to be sanitized. It's not too bad for callers to do a % 360 either, and that way pipelines will fail rather than (somewhat quietly) warn should there be a problem.
Good practice is failing.
Agree that users should sanitize their own input data.
On 5 Aug 2021, at 17:53, Jørgen Kvalsvik @.***> wrote:
Personally I think the right choice is to fail, and require data to be sanitized. It's not too bad for callers to do a % 360 either, and that way pipelines will fail rather than (somewhat quietly) warn should there be a problem.
Good practice is failing.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Current:
Should be: