[ODE] XODE - should angles be in degrees or radians?
William Denniss
lists at omegadelta.net
Sat Mar 20 09:24:16 MST 2004
On Sat, 2004-03-20 at 01:36, George Birbilis wrote:
> > In most cases there will be "30", "45" or some such so it should be
> > obvious enough that these are degrees and not radians.
>
> no need to say
>
> <angle value="30"/>, can say <angle degrees="30"/> instead and avoid any
> misinterpretation of what "degrees" means
>
> unless the pattern <angle>30</angle> will be used which of course can be
> misinterpreted, unless a pattern like
> <angle format="degrees">30</angle> is used
>
> the last one allows for future additions to the format collection (like
> "radians" etc.) and still having strict schema-based validation
>
> the <angle degrees="30"/> pattern may not be so extensible, since even if an
> <angle radians="..."/> was added one might cause problems by writing <angle
> degrees="30" radians="10"/>, that is provide unrelated values to the degrees
> and radians attributes (can't easily enforce it via schema checking) or just
> write <angle/> or something (could consider that though to be equal to 0)
This is an important point for our other running debate - Element vs
Attribute and something I have read elsewhere as well.
Basically they say that attributes are less extensible. One thing they
recommended was just to use attributes that changed the meaning of the
data rather than actually stored it. The example of <angle
format="degrees">30</angle> is exactly that.
Cheers,
Will.
--
William Denniss - will@ http://tanksoftware.com/
More information about the ODE
mailing list