Chromium Code Reviews| Index: src/math.js |
| diff --git a/src/math.js b/src/math.js |
| index e5ab70cc1eb6ee236c79e21db7d73d633533a6b0..9ba1934b851a7224c1ea310fd03597e5ec185707 100644 |
| --- a/src/math.js |
| +++ b/src/math.js |
| @@ -213,6 +213,13 @@ function MathTan(x) { |
| return %_MathTan(x); |
| } |
| +// Non-standard extension. |
| +function MathImul(x, y) { |
| + if (!IS_NUMBER(x)) x = NonNumberToNumber(x); |
| + if (!IS_NUMBER(y)) y = NonNumberToNumber(y); |
| + return %NumberImul(x, y); |
|
Sven Panne
2013/04/29 06:36:00
I think the right way to implement this would be r
|
| +} |
| + |
| // ------------------------------------------------------------------- |
| @@ -283,7 +290,8 @@ function SetUpMath() { |
| "atan2", MathAtan2, |
| "pow", MathPow, |
| "max", MathMax, |
| - "min", MathMin |
| + "min", MathMin, |
| + "imul", MathImul |
| )); |
| } |