| OLD | NEW |
| 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 Loading... |
| 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 }); |
| OLD | NEW |