Boost logo

Boost :

From: Phil Richards (news_at_[hidden])
Date: 2003-12-16 15:50:32


On 2003-12-16, Matthias Schabel <boost_at_[hidden]> wrote:
[...trim...]
> There are a couple of options for those who don't feel that degrees and
> radians should be classified as units:
[...]

There is no doubt that degrees and radians are units.

This distracts from the fact that the primary purpose of the
library that is being written is dimensional analysis - and this
is orthognal to units. A length is a length whether it is in the
SI unit system (and represented as meters) or in the Imperial
unit system (and represented as feet).

Angles are, within a dimensional analysis context, usually
viewed as dimensionless - but they are not unitless - we have
radians and degrees, after all.

But we all know this.

There is a clear definition of what the physical dimension of
an "Angle * Angle" is: it is "zero" (dimensionless, if you
prefer).

I haven't, I admit, got a clue what the *unit* of angle-squared
is in the SI system - the most obvious would be steradian, but
that just feels plain wrong. And, as has been pointed out,
it is not unusual to have equations like:

    theta*theta + phi

where any obvious types of "unit" (not dimensional) arithmetic
don't seem to make sense. I have to say I disagree with YANL on:

    SI<double>::Length(2.0) * (1.0 * _radians)

generating a value of:

    2 m rd

There are way too many places where "angle * length" are expected
to return "length" to make this type of dimensional analysis
feel correct. But maybe that is just me.

I think much of the disagreement/confusion in this debate comes
from trying to solve 2 different problems by combining them
into one, incompatible one.

phil

p.s. I can't help but feel the discussion is getting a little
more excited than perhaps it needs to be. We are, after all,
only talking about a C++ library...

-- 
change name before "@" to "phil" for email

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