Chromium Code Reviews| Index: src/math.js |
| diff --git a/src/math.js b/src/math.js |
| index b802de0f461130cf01cb71e864e9ae69e0af1829..20f36e6bb1ae7cd4dec997a941a45baa25a9446a 100644 |
| --- a/src/math.js |
| +++ b/src/math.js |
| @@ -24,8 +24,7 @@ var GlobalArray = global.Array; |
| // ECMA 262 - 15.8.2.1 |
| function MathAbs(x) { |
| x = +x; |
| - if (x > 0) return x; |
| - return 0 - x; |
| + return (x > 0) ? x : 0 - x; |
| } |
| // ECMA 262 - 15.8.2.2 |