diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-12-26 20:11:45 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-12-26 20:11:45 +1100 |
commit | 6a1ea4aa30bd429037d430f9fd2eb89a0f7905bb (patch) | |
tree | 030d4982fc00d919abc5fdcd0d3f79904e495ea4 /source/core/StarMathCommon.hpp | |
parent | 0a506401aa18cacb5c214823a1279a9a79bc5205 (diff) |
change math constants to constexpr
Diffstat (limited to 'source/core/StarMathCommon.hpp')
-rw-r--r-- | source/core/StarMathCommon.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/core/StarMathCommon.hpp b/source/core/StarMathCommon.hpp index 1627edb..3890403 100644 --- a/source/core/StarMathCommon.hpp +++ b/source/core/StarMathCommon.hpp @@ -10,11 +10,11 @@ namespace Star { STAR_EXCEPTION(MathException, StarException); namespace Constants { - double const pi = 3.14159265358979323846; - double const rad2deg = 57.2957795130823208768; - double const deg2rad = 1 / rad2deg; - double const sqrt2 = 1.41421356237309504880; - double const log2e = 1.44269504088896340736; + double constexpr pi = 3.14159265358979323846; + double constexpr rad2deg = 57.2957795130823208768; + double constexpr deg2rad = 1 / rad2deg; + double constexpr sqrt2 = 1.41421356237309504880; + double constexpr log2e = 1.44269504088896340736; } // Really common std namespace includes, and replacements for std libraries |