summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2020-05-24 21:32:11 +0300
committerAndreas Kling <kling@serenityos.org>2020-05-24 23:30:12 +0200
commit31359e3ad2f8c58e26853d3c07b886b822edbf81 (patch)
tree9fa1501554fec32209dd34d0dccce98ff42ade14
parenta449a0b9774eb225414e260c1022b30627d43904 (diff)
downloadserenity-31359e3ad2f8c58e26853d3c07b886b822edbf81.zip
LibJS: Use the new math constants
Instead of evaluating their values at runtime.
-rw-r--r--Libraries/LibJS/Runtime/MathObject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibJS/Runtime/MathObject.cpp b/Libraries/LibJS/Runtime/MathObject.cpp
index 73ee7696c0..86ec01a72f 100644
--- a/Libraries/LibJS/Runtime/MathObject.cpp
+++ b/Libraries/LibJS/Runtime/MathObject.cpp
@@ -62,8 +62,8 @@ MathObject::MathObject()
put("LOG2E", Value(log2(M_E)), 0);
put("LOG10E", Value(log10(M_E)), 0);
put("PI", Value(M_PI), 0);
- put("SQRT1_2", Value(::sqrt(1.0 / 2.0)), 0);
- put("SQRT2", Value(::sqrt(2)), 0);
+ put("SQRT1_2", Value(M_SQRT1_2), 0);
+ put("SQRT2", Value(M_SQRT2), 0);
}
MathObject::~MathObject()