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

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: 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
« no previous file with comments | « sky/engine/core/painting/Offset.dart ('k') | sky/engine/core/painting/Point.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
24 result = 37 * result + _dx.hashCode;
25 result = 37 * result + _dy.hashCode;
26 return result;
27 }
28 }
OLDNEW
« no previous file with comments | « sky/engine/core/painting/Offset.dart ('k') | sky/engine/core/painting/Point.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698