mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Fix more clang-tidy reported problems for performance-type-promotion-in-math-fn
Based on 361714253
output
This commit is contained in:
parent
67a4cb7d8a
commit
4827f754ec
3 changed files with 25 additions and 24 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue