mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-16 01:45:36 +02:00
Fix more clang-tidy reported problems for performance-type-promotion-in-math-fn
Based on https://travis-ci.org/minetest/minetest/jobs/361714253 output
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user