Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 dart_library.library('dart/math', null, /* Imports */[ | 1 dart_library.library('dart/math', null, /* Imports */[ |
| 2 'dart/_runtime', | 2 'dart/_runtime', |
| 3 'dart/core' | 3 'dart/core' |
| 4 ], /* Lazy imports */[ | 4 ], /* Lazy imports */[ |
| 5 'dart/_js_helper' | 5 'dart/_js_helper' |
| 6 ], function(exports, dart, core, _js_helper) { | 6 ], function(exports, dart, core, _js_helper) { |
| 7 'use strict'; | 7 'use strict'; |
| 8 let dartx = dart.dartx; | 8 let dartx = dart.dartx; |
| 9 class _JenkinsSmiHash extends core.Object { | 9 class _JenkinsSmiHash extends core.Object { |
| 10 static combine(hash, value) { | 10 static combine(hash, value) { |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 const Point$ = dart.generic(function(T) { | 36 const Point$ = dart.generic(function(T) { |
| 37 class Point extends core.Object { | 37 class Point extends core.Object { |
| 38 Point(x, y) { | 38 Point(x, y) { |
| 39 this.x = x; | 39 this.x = x; |
| 40 this.y = y; | 40 this.y = y; |
| 41 } | 41 } |
| 42 toString() { | 42 toString() { |
| 43 return `Point(${this.x}, ${this.y})`; | 43 return `Point(${this.x}, ${this.y})`; |
| 44 } | 44 } |
| 45 ['=='](other) { | 45 ['=='](other) { |
| 46 if (!dart.is(other, Point$())) return false; | 46 if (!dart.is(other, Point$(core.num))) return false; |
|
Jennifer Messerly
2016/03/08 00:21:31
Hmm, so we now convert `other is Point` to `other
| |
| 47 return dart.equals(this.x, dart.dload(other, 'x')) && dart.equals(this.y , dart.dload(other, 'y')); | 47 return dart.equals(this.x, dart.dload(other, 'x')) && dart.equals(this.y , dart.dload(other, 'y')); |
| 48 } | 48 } |
| 49 get hashCode() { | 49 get hashCode() { |
| 50 return _JenkinsSmiHash.hash2(dart.hashCode(this.x), dart.hashCode(this.y )); | 50 return _JenkinsSmiHash.hash2(dart.hashCode(this.x), dart.hashCode(this.y )); |
| 51 } | 51 } |
| 52 ['+'](other) { | 52 ['+'](other) { |
| 53 dart.as(other, Point$(T)); | 53 dart.as(other, Point$(T)); |
| 54 return new (Point$(T))(dart.notNull(this.x) + dart.notNull(other.x), dar t.notNull(this.y) + dart.notNull(other.y)); | 54 return new (Point$(T))(dart.notNull(this.x) + dart.notNull(other.x), dar t.notNull(this.y) + dart.notNull(other.y)); |
| 55 } | 55 } |
| 56 ['-'](other) { | 56 ['-'](other) { |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 543 exports.sin = sin; | 543 exports.sin = sin; |
| 544 exports.cos = cos; | 544 exports.cos = cos; |
| 545 exports.tan = tan; | 545 exports.tan = tan; |
| 546 exports.acos = acos; | 546 exports.acos = acos; |
| 547 exports.asin = asin; | 547 exports.asin = asin; |
| 548 exports.atan = atan; | 548 exports.atan = atan; |
| 549 exports.sqrt = sqrt; | 549 exports.sqrt = sqrt; |
| 550 exports.exp = exp; | 550 exports.exp = exp; |
| 551 exports.log = log; | 551 exports.log = log; |
| 552 }); | 552 }); |
| OLD | NEW |