Index: src/js/math.js |
diff --git a/src/js/math.js b/src/js/math.js |
index 990a7e993c4f450bdd0879af036820099aa39ec2..8a84fdfd69f7ad32cfeaa0f1fb7a758b567fd09d 100644 |
--- a/src/js/math.js |
+++ b/src/js/math.js |
@@ -75,60 +75,6 @@ function MathLog(x) { |
return %_MathLogRT(TO_NUMBER(x)); |
} |
-// ECMA 262 - 15.8.2.11 |
-function MathMax(arg1, arg2) { // length == 2 |
- var length = %_ArgumentsLength(); |
- if (length == 2) { |
- arg1 = TO_NUMBER(arg1); |
- arg2 = TO_NUMBER(arg2); |
- if (arg2 > arg1) return arg2; |
- if (arg1 > arg2) return arg1; |
- if (arg1 == arg2) { |
- // Make sure -0 is considered less than +0. |
- return (arg1 === 0 && %_IsMinusZero(arg1)) ? arg2 : arg1; |
- } |
- // All comparisons failed, one of the arguments must be NaN. |
- return NaN; |
- } |
- var r = -INFINITY; |
- for (var i = 0; i < length; i++) { |
- var n = %_Arguments(i); |
- n = TO_NUMBER(n); |
- // Make sure +0 is considered greater than -0. |
- if (NUMBER_IS_NAN(n) || n > r || (r === 0 && n === 0 && %_IsMinusZero(r))) { |
- r = n; |
- } |
- } |
- return r; |
-} |
- |
-// ECMA 262 - 15.8.2.12 |
-function MathMin(arg1, arg2) { // length == 2 |
- var length = %_ArgumentsLength(); |
- if (length == 2) { |
- arg1 = TO_NUMBER(arg1); |
- arg2 = TO_NUMBER(arg2); |
- if (arg2 > arg1) return arg1; |
- if (arg1 > arg2) return arg2; |
- if (arg1 == arg2) { |
- // Make sure -0 is considered less than +0. |
- return (arg1 === 0 && %_IsMinusZero(arg1)) ? arg1 : arg2; |
- } |
- // All comparisons failed, one of the arguments must be NaN. |
- return NaN; |
- } |
- var r = INFINITY; |
- for (var i = 0; i < length; i++) { |
- var n = %_Arguments(i); |
- n = TO_NUMBER(n); |
- // Make sure -0 is considered less than +0. |
- if (NUMBER_IS_NAN(n) || n < r || (r === 0 && n === 0 && %_IsMinusZero(n))) { |
- r = n; |
- } |
- } |
- return r; |
-} |
- |
// ECMA 262 - 15.8.2.13 |
function MathPowJS(x, y) { |
return %_MathPow(TO_NUMBER(x), TO_NUMBER(y)); |
@@ -314,8 +260,6 @@ utils.InstallFunctions(GlobalMath, DONT_ENUM, [ |
"sqrt", MathSqrtJS, |
"atan2", MathAtan2JS, |
"pow", MathPowJS, |
- "max", MathMax, |
- "min", MathMin, |
"imul", MathImul, |
"sign", MathSign, |
"trunc", MathTrunc, |
@@ -349,8 +293,6 @@ utils.Export(function(to) { |
to.MathExp = MathExp; |
to.MathFloor = MathFloorJS; |
to.IntRandom = MathRandomRaw; |
- to.MathMax = MathMax; |
- to.MathMin = MathMin; |
}); |
}) |