Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Why are there homogeneous systems? Aren't heterogeneous systems sufficient?

Consider the following code:

cout << sin(asin(180.0 * degrees));

What should this print? If only heterogeneous systems are available it would print 3.14159+ rad Why? Well, asin would return a quantity<dimensionless> effectively losing the information that degrees are being used. In order to propogate this extra information we need homogeneous systems.


PrevUpHomeNext