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

Side by Side Diff: sky/engine/core/painting/OffsetBase.dart

Issue 1214833004: Split Size into Size and Offset. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add the new files also 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 part of dart.sky;
6
7 abstract class OffsetBase {
8 const OffsetBase(this._dx, this._dy);
9
10 final double _dx;
11 final double _dy;
12
13 bool get isInfinite => _dx >= double.INFINITY || _dy >= double.INFINITY;
14
15 bool operator ==(other) {
16 return other is OffsetBase &&
17 other.runtimeType == runtimeType &&
18 other._dx == _dx &&
19 other._dy == _dy;
20 }
21
22 int get hashCode {
23 int result = 373;
Chinmay 2015/06/26 21:55:18 Maybe we should move this way of constructing hash
24 result = 37 * result + _dx.hashCode;
25 result = 37 * result + _dy.hashCode;
26 return result;
27 }
28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698