[ODE] XODE - should angles be in degrees or radians?

Bob Dowland Bob.Dowland at blue52.co.uk
Fri Mar 19 18:02:40 MST 2004


> > But, not being able to store things like right angles precisely, 
> > would seem like a bit of a showstopper for a geom/phys file format. 
> 
> I believe this argument is a fallacy. The reason is that ODE, 
> internally, uses radians, so even if you can "store" a 90 degree angle 
> precisely, as soon as you "load" that into ODE, it's no longer exact.
> 

You're absolutely right! More to the point, when you save back out, that precise 90 degrees is toast (well lightly toasted anyway).

 - I was imagining a scenario in which a file containing a radian represented (90 degree) angle is opened and closed so often that it eventually corrupts itself. But, in fact, this could be far worse with a degree (ie non-"native") representation. 

Focusing on our 90 degree angle we could be seeing:

open file: 90 degrees -> (pi/2 + epsilon) rads
save file: (pi/2 + epsilon) rads -> (90 + moreepsilon) degrees
open file: (90 + moreepsilon) degrees -> (pi/2 + evenmoreepsilon) rads

and so on... 

	So in fact you could potentially corrupt the degrees representation by just opening and close/saving the file - oops!

Theres still the bin<->dec conversion for floats but we get that with either format.

Bob.





**********************************************************************
The information contained in this email and its attachments is
confidential.  It is intended only for the named addressees 
and may not be disclosed to anyone else without consent from
Blue 52 Games Limited. Blue 52 give no warranty that this email 
message (including any attachments to it) is free of any virus 
or other harmful matter and accepts no responsibility for any 
loss or damage resulting from the recipient receiving, opening
 or using it. 
**********************************************************************






More information about the ODE mailing list