|
Boost : |
From: Walter Landry (wlandry_at_[hidden])
Date: 2003-12-16 20:24:34
Matthias Schabel <boost_at_[hidden]> wrote:
> > That seems pointless
> >
> > Ugly
> >
> > Ugly
> >
> > Unhelpful
>
> You're long on fruitless criticism and notably short on constructive
> comments and/or suggestions. I'm sure the group would be delighted
> to be enlightened by your brilliant resolution of this conundrum.
My solution is to not make radians a unit. Your solutions are ugly
and unnatural. Please be more constructive.
> > I have no problems with making degrees a unit. Those shouldn't be
> > mixed with anything else without conversions. But radians are a
> > different matter. If I take arctan(1.0), I expect a number, not
> > something with units.
>
> That's purely by convention.
You are proposing a different convention. That is going to surprise
and annoy a lot of people, including the people working on the Mars
Lander.
> Trig functions use and return radians because that is the most
> efficient way of implementing the underlying algorithms. What do
> you expect the function getSatelliteRollAngle() to return? If it
> just returns a number, there's no way of knowing without looking
> through the documentation, whereas a return type of radians (or
> degrees) is unambiguous and forestalls potential programming errors.
> This way the error will be caught at compile-time. Do it your way
> and it may be caught when the Mars Lander impacts the surface at 6
> km/s...
You have a very narrow view of how radians are used. They are not
just fed to trig functions. They are used as regular numbers all the
time.
Regards,
Walter Landry
wlandry_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk