Chromium Code Reviews| Index: sky/engine/core/painting/Point.dart |
| diff --git a/sky/engine/core/painting/Point.dart b/sky/engine/core/painting/Point.dart |
| index 9fc7082e707bb0c3dc50d944b3848430d42b1c39..60c9c5af66ae22b9df89dc37f6ba32fbf30c94a2 100644 |
| --- a/sky/engine/core/painting/Point.dart |
| +++ b/sky/engine/core/painting/Point.dart |
| @@ -9,5 +9,18 @@ class Point { |
| double y; |
| Point(this.x, this.y); |
|
sethladd
2015/05/27 22:19:49
did you want to throw if x or y are null?
Matt Perry
2015/05/28 17:05:54
Good question... not sure what behavior I want her
|
| -} |
| + bool operator ==(other) { |
| + if (!(other is Point)) return false; |
| + return x == other.x && y == other.y; |
| + } |
| + int get hashCode { |
| + int result = 373; |
| + result = 37 * result + x.hashCode; |
| + result = 37 * result + y.hashCode; |
| + return result; |
| + } |
| + String toString() { |
|
sethladd
2015/05/27 22:19:49
not sure about your project's style, but this coul
Matt Perry
2015/05/28 17:05:54
Done.
|
| + return "Point($x, $y)"; |
| + } |
| +} |