Fix C5055 warnings on C++20 and up (#2637)

* Fix C5055 (operator 'operator-name': deprecated between enumerations and floating-point types) warnings on C++20 and up

* Changed static_casts to functional-style casts

Co-authored-by: Raziel Alphadios <raziely@gmail.com>
This commit is contained in:
Raziel Alphadios
2021-10-27 19:33:03 +03:00
committed by GitHub
parent 9f3b3d38c5
commit 9cc470a390
3 changed files with 11 additions and 11 deletions

View File

@@ -267,7 +267,7 @@ namespace
private:
void CalculateSunOrbit()
{
float day = 30.0f * m_month + 15.0f;
const float day = 30.0f * float(m_month) + 15.0f;
float lambda = 280.46f + 0.9856474f * day;
lambda = bx::toRad(lambda);
m_delta = bx::asin(bx::sin(m_eclipticObliquity) * bx::sin(lambda) );