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

Side by Side Diff: ui/gfx/geometry/scroll_offset.cc

Issue 584503005: Make scroll offset type of float in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scroll delta -> vector2dF, scroll offset -> ScrollOffset Created 6 years, 2 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 2014 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 #include "ui/gfx/geometry/scroll_offset.h"
6
7 namespace gfx {
8
9 bool ScrollOffset::IsZero() const {
10 return x_ == 0 && y_ == 0;
11 }
12
13 void ScrollOffset::Add(const ScrollOffset& other) {
14 x_ += other.x_;
15 y_ += other.y_;
16 }
17
18 void ScrollOffset::Subtract(const ScrollOffset& other) {
19 x_ -= other.x_;
20 y_ -= other.y_;
21 }
22
23 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698