Boost logo

Boost Users :

Subject: [Boost-users] Nautical miles and boost::units
From: Esben Mose Hansen (boost_at_[hidden])
Date: 2009-02-13 10:04:17


Hi,

What sort of magic do I have to write to get this sort of thing to work?

===
typedef boost::units::quantity<boost::units::si::length> length_t;

length_t earth_radius = 3438.461 * nautical_mile;
===

boost::units defines a boost::units::metric::nautical_mile_base_unit in terms
of meters, so the numbers and concepts are in the library already. Somehow.

Thanks for any help :)

-- 
kind regards, Esben

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net