From 6a1ea4aa30bd429037d430f9fd2eb89a0f7905bb Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Thu, 26 Dec 2024 20:11:45 +1100 Subject: [PATCH] change math constants to constexpr --- source/core/StarMathCommon.hpp | 10 +++++----- 1 file 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