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

Unified Diff: sky/sdk/lib/framework/rendering/object.dart

Issue 1177343002: Update paths in sky_home.dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix touch demo and sector layout demos Created 5 years, 6 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
Index: sky/sdk/lib/framework/rendering/object.dart
diff --git a/sky/sdk/lib/framework/rendering/object.dart b/sky/sdk/lib/framework/rendering/object.dart
index c3dc2f094936ebba5789c670adfa2314868f6731..a13504c6063f60b3f516d682fc3a2480ff824111 100644
--- a/sky/sdk/lib/framework/rendering/object.dart
+++ b/sky/sdk/lib/framework/rendering/object.dart
@@ -4,6 +4,7 @@
import '../node.dart';
import '../scheduler.dart' as scheduler;
+import 'dart:math' as math;
Hixie 2015/06/11 22:14:10 see note above about conventions for import order
import 'dart:sky' as sky;
import 'dart:sky' show Point, Size, Rect, Color, Paint, Path;
export 'dart:sky' show Point, Size, Rect, Color, Paint, Path;
@@ -266,6 +267,13 @@ class HitTestResult {
}
}
+double clamp({double min: 0.0, double value: 0.0, double max: double.INFINITY}) {
Hixie 2015/06/11 22:14:10 see note above about spaces around arguments
+ assert(min != null);
+ assert(value != null);
+ assert(max != null);
+ return math.max(min, math.min(max, value));
+}
+
// GENERIC MIXIN FOR RENDER NODES WITH ONE CHILD

Powered by Google App Engine
This is Rietveld 408576698