SFML community forums
General => Feature requests => Topic started by: Kingdom of Fish on February 03, 2008, 08:13:40 pm
-
Hi, I was wondering if you are planning to add functionality to set the rotation of a sprite using radians instead of degrees?
-
Hum, no. This should be enough if you need it :
inline float RadToDeg(float Rad)
{
return Deg / M_PI * 180.f;
}
sprite.SetRotation(RadToDeg(1.158f));
-
My original thought was that most libraries uses radians for rotation and that opengl did so too, which would mean you already did the conversion once... but looking at the code i noticed i was wrong.
-
Well, I don't think it makes much difference, as one can easily write and use DegToRad and RadToDeg functions.
I just wanted to use something "human-friendly" by default, so that you can write Sprite.Rotate(90) instead of Sprite.Rotate(M_PI / 2.f).
-
Well thats a good enough reason, I'm just in favor of options... more so then necessary probably.
-
Well, I don't think it makes much difference, as one can easily write and use DegToRad and RadToDeg functions.
I just wanted to use something "human-friendly" by default, so that you can write Sprite.Rotate(90) instead of Sprite.Rotate(M_PI / 2.f).
but radians are more programmer friendly! :)
-
I guess everyone has its own preference ;)
-
Well, I don't think it makes much difference, as one can easily write and use DegToRad and RadToDeg functions.
I just wanted to use something "human-friendly" by default, so that you can write Sprite.Rotate(90) instead of Sprite.Rotate(M_PI / 2.f).
Funny you should say that, as I find radian way more human friendly than degrees. I hate having to figure out degrees to radians and back. I love Pi, why the hate on pi? I'm actually annoyed that degrees is what sprite uses for rotation.
Just my thoughts on the matter.
-
Thanks for reviving a 6 year-old thread just to complain about something that will never change anyway.
-
Thanks for reviving a 6 year-old thread just to complain about something that will never change anyway.
(y) Degrees 4ever
-
The degrees are most likely converted to radians internally at some point anyway, hence why using radians could be benificial (but unlikely).
-
The degrees are most likely converted to radians internally at some point anyway, hence why using radians could be benificial (but unlikely).
beneficial? -> look up «premature optimization».
-
This 6-year old thread has already been necromanced, there's no need to artificially keep it alive. I think it should be closed, no new arguments have been brought anyway.