From 31359e3ad2f8c58e26853d3c07b886b822edbf81 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sun, 24 May 2020 21:32:11 +0300 Subject: [PATCH] LibJS: Use the new math constants Instead of evaluating their values at runtime. --- Libraries/LibJS/Runtime/MathObject.cpp | 4 ++-- 1 file 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()