Boost logo

Boost Users :

Subject: Re: [Boost-users] Using atan2 in boost::units
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-01-04 11:49:15


AMDG

Brandon Olivares wrote:
> On 2010-01-04, Steven Watanabe wrote:
>
>> The problem is that the library tries to determine the return type
>> from the system. In this case, the system doesn't include a unit of
>> angle, so the call fails.
>>
>
> Thank you. So how should I use it then when the two variables are lengths,
> not angles?
>

Something like this should work:

typedef boost::units::unit<
    boost::units::length_dimension,
    boost::units::make_system<
        boost::units::angle::radian_base_unit,
        boost::units::astronomical::light_second_base_unit
>::type
> light_second_unit;

In Christ,
Steven Watanabe


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