comparison engine/core/util/math/angles.h @ 646:07b1cf8e92b5

* Major improvements to fife_math.h and added corresponding Python bindings. Users now have access to FIFE's internal math functions. These functions are recommended to be used by all clients if required. Note: this may cause some problems with certain compilers. I hope this wont have to be reverted. TODO: remove the static constant globals somehow. * Adopted the new math functions for all subsystems * Improvements to DeviceCaps. It now detects all possible screen modes. * User can now select 0 for their bpp and it will attempt to initialize SDL with the current screen bpp.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Wed, 13 Oct 2010 20:24:48 +0000
parents 356634098bd9
children
comparison
equal deleted inserted replaced
645:291ba2946c73 646:07b1cf8e92b5
50 ExactModelCoordinate c2 = loc2.getMapCoordinates(); 50 ExactModelCoordinate c2 = loc2.getMapCoordinates();
51 51
52 double dy = (c2.y - c1.y); 52 double dy = (c2.y - c1.y);
53 double dx = (c2.x - c1.x); 53 double dx = (c2.x - c1.x);
54 54
55 int angle = static_cast<int>(atan2(-dy,dx)*(180.0/DBL_PI)); 55 int angle = static_cast<int>(Mathd::ATan2(-dy,dx)*(180.0/Mathd::pi()));
56 56
57 return angle; 57 return angle;
58 } 58 }
59 } 59 }
60 60