Chromium Code Reviews| Index: sdk/lib/math/math.dart |
| diff --git a/sdk/lib/math/math.dart b/sdk/lib/math/math.dart |
| index d167d80f86a07823fbf6134be43ca104b04a090c..91352d75bed49dc770cc9359230556186a35ff86 100644 |
| --- a/sdk/lib/math/math.dart |
| +++ b/sdk/lib/math/math.dart |
| @@ -63,7 +63,7 @@ const double SQRT2 = 1.4142135623730951; |
| * same mathematical value) then it is unspecified which of the two arguments |
| * is returned. |
| */ |
| -num min(num a, num b) { |
| +num/*=T*/ max/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) { |
|
Lasse Reichstein Nielsen
2015/11/19 06:58:32
Is this a way to say that max of two doubles is a
Jennifer Messerly
2015/11/20 17:41:18
Exactly.
|
| // These partially redundant type checks improve code quality for dart2js. |
| // Most of the improvement is at call sites from the inferred non-null num |
| // return type. |
| @@ -98,7 +98,7 @@ num min(num a, num b) { |
| * otherwise equal (including int and doubles with the same mathematical value) |
| * then it is unspecified which of the two arguments is returned. |
| */ |
| -num max(num a, num b) { |
| +num/*=T*/ max/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) { |
| // These partially redundant type checks improve code quality for dart2js. |
| // Most of the improvement is at call sites from the inferred non-null num |
| // return type. |