[Bf-python] radians in the api [was Re: [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11267] ...]
Stephen Swaney
sswaney at centurytel.net
Sun Jul 15 06:37:18 CEST 2007
On Sun, Jul 15, 2007 at 11:51:13AM +1000, Campbell Barton wrote:
> However I got the impression that it was agree'd that al things
> considered radians were the way to go.
Best to do all the angles in the api in radians.
If this were a presentation layer like the gui, doing
them in degrees (or deci-degrees like the ipos) makes some
sense because users are more familiar with them.
(iirc, at one time at least some of the ui values were
in radians because I remember someone asking on the forum
why they were getting weird rotation values)
However, this is a programming api. Any time you break
consistency, you end up with one more detail to keep track
of in your head. Do this often enough and you end up with
a head full of junk and frequent trips to the docs.
If you are creating user interfaces via py you can present
them in degrees with the always handy radians() & degrees()
converters in the math module.
> One thing is sure - We do NOT want to mix both.
Yep. Radians, radians, radians.
--
Stephen Swaney
sswaney at centurytel.net
More information about the Bf-python
mailing list