diff options
| author | elijah-thomas774 <elijahthomas774@gmail.com> | 2025-06-08 00:35:02 -0400 |
|---|---|---|
| committer | elijah-thomas774 <elijahthomas774@gmail.com> | 2025-06-08 00:35:02 -0400 |
| commit | 657f2455ff276a72f52708890fba83e9065b89cd (patch) | |
| tree | a7253035d278bc6b20d32f56ac5f8bea045ab3c6 /src/d/d_light_env.cpp | |
| parent | 86b6ef11c8bb0943fea9bd8cfefd65f323898963 (diff) | |
use cmath for sinf/cosf
Diffstat (limited to 'src/d/d_light_env.cpp')
| -rw-r--r-- | src/d/d_light_env.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/d/d_light_env.cpp b/src/d/d_light_env.cpp index 8ddcbe90..00671095 100644 --- a/src/d/d_light_env.cpp +++ b/src/d/d_light_env.cpp @@ -11,6 +11,8 @@ #include "m/m_vec.h" #include "nw4r/math/math_arithmetic.h" +#include <cmath> + dLightEnv_c dLightEnv_c::sInstance; dLightEnv_c *dLightEnv_c::sPInstance; @@ -39,24 +41,14 @@ void dLightEnv_c::get_vectle_calc(const mVec3_c *pInA, const mVec3_c *pInB, mVec vectle_calc(&pos, pOut); } -// TODO(??) -inline f32 sinf(f32 x) { - return sin(x); -} - -// TODO(??) -inline f32 cosf(f32 x) { - return cos(x); -} - void dLightEnv_c::sphere_to_cartesian(f32 angY, f32 angXZ, mVec3_c *pOut) { f32 radY = angY / (180.f / M_PI); f32 radXZ = angXZ / (180.f / M_PI); mVec3_c pos; - pos.x = cosf(radY) * sinf(radXZ); - pos.y = sinf(radY); - pos.z = cosf(radY) * cosf(radXZ); + pos.x = std::cosf(radY) * std::sinf(radXZ); + pos.y = std::sinf(radY); + pos.z = std::cosf(radY) * std::cosf(radXZ); pOut->x = pos.x; pOut->y = pos.y; |
