Boost logo

Boost :

From: Matthias Schabel (boost_at_[hidden])
Date: 2003-12-16 13:03:48


> 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.

> 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. 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...

------------------------------------------------------------------------
---------------------------
Matthias Schabel, Ph.D.
Utah Center for Advanced Imaging Research
729 Arapeen Drive
Salt Lake City, UT 84108
801-587-9413 (work)
801-585-3592 (fax)
801-706-5760 (cell)
801-484-0811 (home)
mschabel at ucair med utah edu


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk