[units] atan2 functionality with same dimension for y and x

I found that when I passed atan2 a quantitysi::length value for both y and x the compiler gave me an error. Upon examination of the atan2 method in "boost/units/cmath.hpp" I found it expected both inputs to atan2 to be dimensionless. The method atan2 can be represented simplistically as atan(y / x). As long as both dimensions to y and x are the same the results is a dimensionless value of (y / x). So shouldn't the inputs to boost::units::atan2 accept any dimension of y and x as long as they are the same? Ryan

AMDG On 04/22/2011 08:13 AM, Ryan wrote:
I found that when I passed atan2 a quantitysi::length value for both y and x the compiler gave me an error. Upon examination of the atan2 method in "boost/units/cmath.hpp" I found it expected both inputs to atan2 to be dimensionless. The method atan2 can be represented simplistically as atan(y / x). As long as both dimensions to y and x are the same the results is a dimensionless value of (y / x). So shouldn't the inputs to boost::units::atan2 accept any dimension of y and x as long as they are the same?
You need a more recent version of Boost. It looks like this was fixed in [54873] (July, 2009). In Christ, Steven Watanabe
participants (2)
-
Ryan
-
Steven Watanabe