LibJS: Fix Math.SQRT1_2

The value of Math.SQRT1_2 was zero as we were dividing two integers.
This commit is contained in:
Linus Groh 2020-04-05 14:16:26 +01:00 committed by Andreas Kling
parent 500f6d9e3a
commit 2f775a925b
Notes: sideshowbarker 2024-07-19 07:53:28 +09:00

View file

@ -49,7 +49,7 @@ MathObject::MathObject()
put("LOG2E", Value(log2(M_E)));
put("LOG10E", Value(log10(M_E)));
put("PI", Value(M_PI));
put("SQRT1_2", Value(::sqrt(1 / 2)));
put("SQRT1_2", Value(::sqrt(1.0 / 2.0)));
put("SQRT2", Value(::sqrt(2)));
}