
11 Oct
2009
11 Oct
'09
8:14 p.m.
Hi, I just discover boost::units and I want to know how it works in this case : quantitysi::plane_angle angle(45 * degree); When the constructor is called, is the argument converted in radian or not ? Moreover, it is possible to have : quantity?::plane_angle> angle(45 * degree); angle += pi / 4 * radian; cout << angle << endl; cout << quantitydegree::plane_angle(angle) << endl; cout << quantityradian::plane_angle(angle) << endl; cout << angle.value<degree>() << endl; cout << angle.value<radian>() << endl; output : 45 deg + pi / 4 rad 90 deg pi / 2 rad 90 1.57079632679 Thanks. -- Damien R