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

Side by Side Diff: chrome/browser/resources/print_preview/data/coordinate2d.js

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Immutable two dimensional point in space. The units of the dimensions are 9 * Immutable two dimensional point in space. The units of the dimensions are
10 * undefined. 10 * undefined.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 */ 56 */
57 scale: function(factor) { 57 scale: function(factor) {
58 return new Coordinate2d(this.x_ * factor, this.y_ * factor); 58 return new Coordinate2d(this.x_ * factor, this.y_ * factor);
59 }, 59 },
60 60
61 /** 61 /**
62 * @param {print_preview.Coordinate2d} other The point to compare against. 62 * @param {print_preview.Coordinate2d} other The point to compare against.
63 * @return {boolean} Whether another point is equal to this one. 63 * @return {boolean} Whether another point is equal to this one.
64 */ 64 */
65 equals: function(other) { 65 equals: function(other) {
66 return other != null && 66 return other != null && this.x_ == other.x_ && this.y_ == other.y_;
67 this.x_ == other.x_ &&
68 this.y_ == other.y_;
69 } 67 }
70 }; 68 };
71 69
72 // Export 70 // Export
73 return { 71 return {Coordinate2d: Coordinate2d};
74 Coordinate2d: Coordinate2d
75 };
76 }); 72 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698