diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2018-04-03 21:58:29 +0200 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2018-04-03 21:58:29 +0200 |
commit | 4827f754ec9efc1e1fa8e519eaa211ed768e25c0 (patch) | |
tree | 182f2e12267fb2a282df17b95fbcff1750f47fca /src/minimap.cpp | |
parent | 67a4cb7d8a4461fe7d5206189fd4e9539beb20b7 (diff) | |
download | minetest-4827f754ec9efc1e1fa8e519eaa211ed768e25c0.tar.xz |
Fix more clang-tidy reported problems for performance-type-promotion-in-math-fn
Based on https://travis-ci.org/minetest/minetest/jobs/361714253 output
Diffstat (limited to 'src/minimap.cpp')
-rw-r--r-- | src/minimap.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/minimap.cpp b/src/minimap.cpp index 59753e246..98bb7d9c3 100644 --- a/src/minimap.cpp +++ b/src/minimap.cpp @@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "minimap.h" +#include <cmath> #include "client.h" #include "clientmap.h" #include "settings.h" @@ -428,8 +429,8 @@ v3f Minimap::getYawVec() { if (data->minimap_shape_round) { return v3f( - cos(m_angle * core::DEGTORAD), - sin(m_angle * core::DEGTORAD), + std::cos(m_angle * core::DEGTORAD), + std::sin(m_angle * core::DEGTORAD), 1.0); } @@ -531,8 +532,8 @@ void Minimap::drawMinimap() core::rect<s32> img_rect(0, 0, imgsize.Width, imgsize.Height); static const video::SColor col(255, 255, 255, 255); static const video::SColor c[4] = {col, col, col, col}; - f32 sin_angle = sin(m_angle * core::DEGTORAD); - f32 cos_angle = cos(m_angle * core::DEGTORAD); + f32 sin_angle = std::sin(m_angle * core::DEGTORAD); + f32 cos_angle = std::cos(m_angle * core::DEGTORAD); s32 marker_size2 = 0.025 * (float)size; for (std::list<v2f>::const_iterator i = m_active_markers.begin(); |