
13 Aug
2015
13 Aug
'15
1:14 p.m.
AMDG On 08/12/2015 04:39 PM, Michael Powell wrote:
Just wanted to clarify something. These should convert from given quantities to the desired units?
If what you really want is a raw double, than, yes, this should work.
double unit_conversion::from_length_to_inches(quantity<length> const & L) { const quantity<inch_base_unit::unit_type> result_(L); return result_.value(); }
double unit_conversion::from_mass_to_pounds(quantity<mass> const & M) {
Pounds is a unit of force, not mass. To do such a conversion, you need to multiply by g.
const quantity<ounce_base_unit::unit_type> result_(M); return result_.value(); }
In Christ, Steven Watanabe