ghorn / dynobud

your dynamic optimization buddy
GNU Lesser General Public License v3.0
27 stars 5 forks source link

full atan2 support #31

Closed ghorn closed 10 years ago

ghorn commented 10 years ago

If I add RealFloat, there will be runtime exceptions on most members of that class but atan2 would work. Another way would to make an Arctan2 typeclass with only an arctan2 function.

My current workaround is

atan2' :: Floating a => a -> a -> a
atan2' y x = 2 * atan (y / (sqrt(x*x + y*y + 1e-15) + x) )
ghorn commented 10 years ago

now implemented