|
Boost Users : |
Subject: [Boost-users] Using atan2 in boost::units
From: Brandon Olivares (programmer2188_at_[hidden])
Date: 2010-01-04 10:55:34
Hi,
I need to use the boost::units::atan2() function in boost/units/cmath.hpp,
but am having trouble figuring out how. Do the units have to be
dimensionless, or can they be any unit?
I have two variables, x_ and y_ which are of a scaled unit type, called
light_second_unit. I'm calling it like this:
boost::units::atan2(y_, x_);
I get this error:
./physics/cartesian_coordinate_system/point.cpp:85: error: no matching
function for call to
`atan2(boost::units::quantity<boost::units::astronomical::light_second_unit,
double>,
boost::units::quantity<boost::units::astronomical::light_second_unit,
double>)'
If it has to be dimensionless, how do I convert them to a dimensionless
quantity?
Thanks,
Brandon
-- www.creatorspiritus.com Blog and forum discussing living a Christ-centered life Follow me on Twitter: http://twitter.com/devbanana Follow creatorspiritus.com on Twitter: http://twitter.com/creatorspiritus
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