summaryrefslogtreecommitdiff
path: root/src/particles.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2018-04-04 07:42:40 +0200
committerLoic Blot <loic.blot@unix-experience.fr>2018-04-04 07:42:40 +0200
commit8e0b80aa369df7d1142053f077df928106c6ce8c (patch)
tree7f12869eef1a18364be9d8db67e01d060bc11d60 /src/particles.cpp
parenta90d27e1e23fa1c369c05a4d9c6083aa86ef7f52 (diff)
downloadminetest-8e0b80aa369df7d1142053f077df928106c6ce8c.tar.gz
minetest-8e0b80aa369df7d1142053f077df928106c6ce8c.tar.bz2
minetest-8e0b80aa369df7d1142053f077df928106c6ce8c.zip
Fix last performance-type-promotion-in-math-fn problems
Diffstat (limited to 'src/particles.cpp')
-rw-r--r--src/particles.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/particles.cpp b/src/particles.cpp
index 0a6651ce4..e98068f53 100644
--- a/src/particles.cpp
+++ b/src/particles.cpp
@@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "particles.h"
+#include <cmath>
#include "client.h"
#include "collision.h"
#include "client/clientevent.h"
@@ -227,7 +228,8 @@ void Particle::updateVertices()
for (video::S3DVertex &vertex : m_vertices) {
if (m_vertical) {
v3f ppos = m_player->getPosition()/BS;
- vertex.Pos.rotateXZBy(atan2(ppos.Z-m_pos.Z, ppos.X-m_pos.X)/core::DEGTORAD+90);
+ vertex.Pos.rotateXZBy(std::atan2(ppos.Z - m_pos.Z, ppos.X - m_pos.X) /
+ core::DEGTORAD + 90);
} else {
vertex.Pos.rotateYZBy(m_player->getPitch());
vertex.Pos.rotateXZBy(m_player->getYaw());