New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store angles internally as radians #2976
Comments
I've done the work so we can discuss pros/cons: |
I'm open to this idea if it means fewer lossy conversions between degrees and radians. The fact that the standard library exclusively uses radians compels me to prefer radians. I can't imagine users noticing or caring what underlying representation we choose. |
Well, no need to imagine, this issue is a proof 😄 On a more serious note, I agree that this is a good idea. |
Prerequisite Checklist
Describe your feature request here
It has been mildly bothering me that angles are internally stored as degrees instead of radians.
It makes more sense to store them internally in radians, since thats what hardware is optimized for. Rather than having to convert them to radians all the time, only to have to convert them back immediately after.
Especially now that in 3.0 angles are unit-aware with
sf::Angle
, I don't see any reason to use degrees anymore.Its a fairly trivial change and I'd be happy to PR it myself, but I suspect this is the kind of thing that needs to be discussed first ;)
Use Cases
transform.rotate(vector.angle())
API Example
No response
The text was updated successfully, but these errors were encountered: