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

Side by Side Diff: client/touch/Geometry.dart

Issue 8680038: Revert initializing formals change in client code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/samples/swarm/DataSource.dart ('k') | client/touch/Scroller.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Represents a point in 2 dimensional space. 6 * Represents a point in 2 dimensional space.
7 */ 7 */
8 class Coordinate { 8 class Coordinate {
9 9
10 /** 10 /**
11 * X-value 11 * X-value
12 */ 12 */
13 num x; 13 num x;
14 14
15 /** 15 /**
16 * Y-value 16 * Y-value
17 */ 17 */
18 num y; 18 num y;
19 19
20 Coordinate([num x = 0, num y = 0]) : this.x = x, this.y = y { 20 Coordinate([num this.x = 0, num this.y = 0]) {
21 } 21 }
22 22
23 /** 23 /**
24 * Gets the coordinates of a touch's location relative to the window's 24 * Gets the coordinates of a touch's location relative to the window's
25 * viewport. [input] is either a touch object or an event object. 25 * viewport. [input] is either a touch object or an event object.
26 */ 26 */
27 Coordinate.fromClient(var input) : this(input.clientX, input.clientY); 27 Coordinate.fromClient(var input) : this(input.clientX, input.clientY);
28 28
29 static Coordinate difference(Coordinate a, Coordinate b) { 29 static Coordinate difference(Coordinate a, Coordinate b) {
30 return new Coordinate(a.x - b.x, a.y - b.y); 30 return new Coordinate(a.x - b.x, a.y - b.y);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 bool contains(num value) { 84 bool contains(num value) {
85 return value >= start && value < end; 85 return value >= start && value < end;
86 } 86 }
87 87
88 String toString() { 88 String toString() {
89 return '(${start}, ${end})'; 89 return '(${start}, ${end})';
90 } 90 }
91 } 91 }
OLDNEW
« no previous file with comments | « client/samples/swarm/DataSource.dart ('k') | client/touch/Scroller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698