aboutsummaryrefslogtreecommitdiffstats
path: root/common/math_defs.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-01-27 02:59:07 -0800
committerChris Robinson <[email protected]>2022-01-27 02:59:07 -0800
commitf8ac1ffe805b13c8b1cd2bc4d4a8362cbe1c2cbe (patch)
treea8a24a3e85f7a8f00cf3947da37e97ab0f42d3f6 /common/math_defs.h
parent1bbea9cd3060ef65a2623f156b4f12ebf62c52fe (diff)
Get rid of MathDefs
Diffstat (limited to 'common/math_defs.h')
-rw-r--r--common/math_defs.h23
1 files changed, 2 insertions, 21 deletions
diff --git a/common/math_defs.h b/common/math_defs.h
index ba007115..d66923ea 100644
--- a/common/math_defs.h
+++ b/common/math_defs.h
@@ -1,26 +1,7 @@
#ifndef AL_MATH_DEFS_H
#define AL_MATH_DEFS_H
-constexpr float Deg2Rad(float x) noexcept { return x * 1.74532925199432955e-02f/*pi/180*/; }
-constexpr float Rad2Deg(float x) noexcept { return x * 5.72957795130823229e+01f/*180/pi*/; }
-
-namespace al {
-
-template<typename Real>
-struct MathDefs { };
-
-template<>
-struct MathDefs<float> {
- static constexpr float Pi() noexcept { return 3.14159265358979323846e+00f; }
- static constexpr float Tau() noexcept { return 6.28318530717958647692e+00f; }
-};
-
-template<>
-struct MathDefs<double> {
- static constexpr double Pi() noexcept { return 3.14159265358979323846e+00; }
- static constexpr double Tau() noexcept { return 6.28318530717958647692e+00; }
-};
-
-} // namespace al
+constexpr float Deg2Rad(float x) noexcept
+{ return static_cast<float>(x * 1.74532925199432955e-02/*pi/180*/); }
#endif /* AL_MATH_DEFS_H */