summaryrefslogtreecommitdiff
path: root/AK/Math.h
diff options
context:
space:
mode:
authorHediadyoin1 <leon2002.la@gmail.com>2022-06-13 17:05:06 +0200
committerAndreas Kling <kling@serenityos.org>2022-06-14 23:00:52 +0200
commite6a3cac5ceae4043a8275244d03e71474463c7c2 (patch)
tree638f8543dd7c5361d413f5bda69e2a06cc360c97 /AK/Math.h
parent1fa976722a2792a653db60d4a14cdcde1a1421fc (diff)
downloadserenity-e6a3cac5ceae4043a8275244d03e71474463c7c2.zip
AK: Add sqrt(2) and sqrt(1/2) constants
Diffstat (limited to 'AK/Math.h')
-rw-r--r--AK/Math.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/AK/Math.h b/AK/Math.h
index 212bd2c4e1..1dd4e3c6ed 100644
--- a/AK/Math.h
+++ b/AK/Math.h
@@ -23,6 +23,10 @@ template<FloatingPoint T>
constexpr T Pi = 3.141592653589793238462643383279502884L;
template<FloatingPoint T>
constexpr T E = 2.718281828459045235360287471352662498L;
+template<FloatingPoint T>
+constexpr T Sqrt2 = 1.414213562373095048801688724209698079L;
+template<FloatingPoint T>
+constexpr T Sqrt1_2 = 0.707106781186547524400844362104849039L;
namespace Details {
template<size_t>