Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2003-11-19 22:41:28


"Andy Little" <andy_at_[hidden]> wrote in message
news:bphbjf$buc$1_at_sea.gmane.org...
>
> "Matthias Schabel" <boost_at_[hidden]> wrote in message
> news:A0372BA0-1AC9-11D8-B778-000393DC6706_at_schabel-family.org...
[snip]
> > Hmmm...I would argue that the dimensionless result of a unit
> > computation is
> > fundamentally different than a normal POD value - for example, units of
> > angular
> > measure are technically dimensionless, but there is clear value in
> > keeping track of
> > them.
>

[snip]

> The programmer imposes a type on the entity when it is ouput.
> A physical quantity consists in a concise amount of information. Keep it
> simple.
> e.g
> pq_length<float>::m length1(1), length2(1);
> pq_angle<float>::radians alpha = length1/length2;
> pq_angle<float>::degrees beta = length1/length2;

Hoisted on my own rope !
It 's probably not possible to convert to degrees in that example without a
dimensionless type.
You win on this one ... C'est la vie :-)

regards
Andy Little


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