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

Unified Diff: sky/engine/core/painting/Offset.dart

Issue 1238573002: AnimatedType should hit |end| (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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/engine/core/painting/Offset.dart
diff --git a/sky/engine/core/painting/Offset.dart b/sky/engine/core/painting/Offset.dart
index 823da122bffb3e443733853337326480b5b28db6..bf365a6764913872560224ec063c1f0133616d4c 100644
--- a/sky/engine/core/painting/Offset.dart
+++ b/sky/engine/core/painting/Offset.dart
@@ -13,6 +13,8 @@ class Offset extends OffsetBase {
double get dx => _dx;
double get dy => _dy;
+ double get distance => math.sqrt(_dx * _dx + _dy * _dy);
+
static const Offset zero = const Offset(0.0, 0.0);
static const Offset infinite = const Offset(double.INFINITY, double.INFINITY);
« no previous file with comments | « sky/engine/bindings/scripts/templates/dart_blink.template ('k') | sky/sdk/lib/animation/animation_performance.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698