ALL: Eliminate LOCAL_PI macro

This commit is contained in:
Pawel Kolodziejski 2020-09-23 23:20:23 +02:00
parent ada0dd648c
commit 27e12d8a96
22 changed files with 35 additions and 45 deletions

View file

@ -112,8 +112,8 @@ void VisualExplodingImage::ExplosionUnit::setPosition(int x, int y) {
void VisualExplodingImage::ExplosionUnit::setExplosionSettings(const Common::Point &center, const Common::Point &amplitude, float scale) {
_center = Math::Vector2d(center.x, center.y);
_speed.setX(cos(StarkRandomSource->getRandomNumber(M_PI * 100)) * (float)amplitude.x);
_speed.setY(sin(StarkRandomSource->getRandomNumber(M_PI * 100)) * (float)amplitude.y);
_speed.setX(cos(StarkRandomSource->getRandomNumber((float)M_PI * 100)) * (float)amplitude.x);
_speed.setY(sin(StarkRandomSource->getRandomNumber((float)M_PI * 100)) * (float)amplitude.y);
// WTF, ensuring all fragments go in the same direction?
float magnitude = _position.getDistanceTo(_speed);