Index: pkg/dev_compiler/lib/js/common/dart_sdk.js |
diff --git a/pkg/dev_compiler/lib/js/common/dart_sdk.js b/pkg/dev_compiler/lib/js/common/dart_sdk.js |
index 8b9f7f91663f457edf369937a4e76407e4b0a037..3482790ae5f348e0df8fb6890ba4e0d787ca2952 100644 |
--- a/pkg/dev_compiler/lib/js/common/dart_sdk.js |
+++ b/pkg/dev_compiler/lib/js/common/dart_sdk.js |
@@ -36958,40 +36958,13 @@ |
math.SQRT2 = 1.4142135623730951; |
math.min = function(T) { |
return (a, b) => { |
- if (!(typeof a == 'number')) dart.throw(new core.ArgumentError(a)); |
- if (!(typeof b == 'number')) dart.throw(new core.ArgumentError(b)); |
- if (dart.notNull(a) > dart.notNull(b)) return b; |
- if (dart.notNull(a) < dart.notNull(b)) return a; |
- if (typeof b == 'number') { |
- if (typeof a == 'number') { |
- if (a == 0.0) { |
- return (dart.notNull(a) + dart.notNull(b)) * dart.notNull(a) * dart.notNull(b); |
- } |
- } |
- if (a == 0 && dart.test(b[dartx.isNegative]) || dart.test(b[dartx.isNaN])) return b; |
- return a; |
- } |
- return a; |
+ return Math.min(_js_helper.checkNum(a), _js_helper.checkNum(b)); |
}; |
}; |
dart.fn(math.min, TAndTToT()); |
math.max = function(T) { |
return (a, b) => { |
- if (!(typeof a == 'number')) dart.throw(new core.ArgumentError(a)); |
- if (!(typeof b == 'number')) dart.throw(new core.ArgumentError(b)); |
- if (dart.notNull(a) > dart.notNull(b)) return a; |
- if (dart.notNull(a) < dart.notNull(b)) return b; |
- if (typeof b == 'number') { |
- if (typeof a == 'number') { |
- if (a == 0.0) { |
- return dart.notNull(a) + dart.notNull(b); |
- } |
- } |
- if (dart.test(b[dartx.isNaN])) return b; |
- return a; |
- } |
- if (b == 0 && dart.test(a[dartx.isNegative])) return b; |
- return a; |
+ return Math.max(_js_helper.checkNum(a), _js_helper.checkNum(b)); |
}; |
}; |
dart.fn(math.max, TAndTToT$()); |