Index: pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart |
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart |
index fc54f6332d1638b942f2056d8b63d9a2e76c7b5f..73a6723374f22404b79880f8fb09faf0282ba15a 100644 |
--- a/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart |
+++ b/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart |
@@ -8,6 +8,14 @@ import 'dart:_js_helper' show patch, checkNum; |
import 'dart:typed_data' show ByteData; |
@patch |
+num/*=T*/ min/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) |
+ => JS('num', r'Math.min(#, #)', checkNum(a), checkNum(b)) as num/*=T*/; |
vsm
2016/09/30 19:36:33
Do we actually need the checkNum? Would a null ch
Bob Nystrom
2016/09/30 19:43:14
Good question. I was just following the nearby cod
|
+ |
+@patch |
+num/*=T*/ max/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) |
+ => JS('num', r'Math.max(#, #)', checkNum(a), checkNum(b)) as num/*=T*/; |
+ |
+@patch |
double sqrt(num x) |
=> JS('num', r'Math.sqrt(#)', checkNum(x)); |