Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: tool/input_sdk/lib/math/rectangle.dart

Issue 1967773005: update dart:math (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tool/input_sdk/lib/math/random.dart ('k') | tool/input_sdk/patch/math_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/lib/math/rectangle.dart
diff --git a/tool/input_sdk/lib/math/rectangle.dart b/tool/input_sdk/lib/math/rectangle.dart
index 1ab292a29afc534775eb8434d86c8151f720fed9..6fe20755c258697a2ecda9e43b4a709bd73c83ae 100644
--- a/tool/input_sdk/lib/math/rectangle.dart
+++ b/tool/input_sdk/lib/math/rectangle.dart
@@ -209,8 +209,8 @@ class MutableRectangle<T extends num> extends _RectangleBase<T>
* point `(left, top)`.
*/
MutableRectangle(this.left, this.top, T width, T height)
- : this._width = (width < 0) ? _clampToZero(width) : width,
- this._height = (height < 0) ? _clampToZero(height) : height;
+ : this._width = (width < 0) ? _clampToZero/*<T>*/(width) : width,
+ this._height = (height < 0) ? _clampToZero/*<T>*/(height) : height;
/**
* Create a mutable rectangle spanned by the points [a] and [b];
@@ -244,7 +244,7 @@ class MutableRectangle<T extends num> extends _RectangleBase<T>
* but will not change [left].
*/
void set width(T width) {
- if (width < 0) width = _clampToZero(width);
+ if (width < 0) width = _clampToZero/*<T>*/(width);
_width = width;
}
@@ -260,7 +260,7 @@ class MutableRectangle<T extends num> extends _RectangleBase<T>
* but will not change [top].
*/
void set height(T height) {
- if (height < 0) height = _clampToZero(height);
+ if (height < 0) height = _clampToZero/*<T>*/(height);
_height = height;
}
}
@@ -270,7 +270,7 @@ class MutableRectangle<T extends num> extends _RectangleBase<T>
*
* Returns `0` if value is int, `0.0` if value is double.
*/
-num _clampToZero(num value) {
+num/*=T*/ _clampToZero/*<T extends num>*/(num/*=T*/ value) {
assert(value < 0);
return -value * 0;
}
« no previous file with comments | « tool/input_sdk/lib/math/random.dart ('k') | tool/input_sdk/patch/math_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698