| OLD | NEW |
| 1 var math; | 1 var math; |
| 2 (function(exports) { | 2 (function(exports) { |
| 3 'use strict'; | 3 'use strict'; |
| 4 class _JenkinsSmiHash extends core.Object { | 4 class _JenkinsSmiHash extends core.Object { |
| 5 static combine(hash, value) { | 5 static combine(hash, value) { |
| 6 hash = 536870911 & dart.notNull(hash) + dart.notNull(value); | 6 hash = 536870911 & dart.notNull(hash) + dart.notNull(value); |
| 7 hash = 536870911 & dart.notNull(hash) + ((524287 & dart.notNull(hash)) <<
10); | 7 hash = 536870911 & dart.notNull(hash) + ((524287 & dart.notNull(hash)) <<
10); |
| 8 return dart.notNull(hash) ^ dart.notNull(hash) >> 6; | 8 return dart.notNull(hash) ^ dart.notNull(hash) >> 6; |
| 9 } | 9 } |
| 10 static finish(hash) { | 10 static finish(hash) { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 return sqrt(dart.notNull(dx) * dart.notNull(dx) + dart.notNull(dy) * dar
t.notNull(dy)); | 54 return sqrt(dart.notNull(dx) * dart.notNull(dx) + dart.notNull(dy) * dar
t.notNull(dy)); |
| 55 } | 55 } |
| 56 squaredDistanceTo(other) { | 56 squaredDistanceTo(other) { |
| 57 let dx = this.x['-'](other.x); | 57 let dx = this.x['-'](other.x); |
| 58 let dy = this.y['-'](other.y); | 58 let dy = this.y['-'](other.y); |
| 59 return dart.as(dart.notNull(dx) * dart.notNull(dx) + dart.notNull(dy) *
dart.notNull(dy), T); | 59 return dart.as(dart.notNull(dx) * dart.notNull(dx) + dart.notNull(dy) *
dart.notNull(dy), T); |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 return Point; | 62 return Point; |
| 63 }); | 63 }); |
| 64 let Point = Point$(dart.dynamic); | 64 let Point = Point$(); |
| 65 class Random extends core.Object { | 65 class Random extends core.Object { |
| 66 Random(seed) { | 66 Random(seed) { |
| 67 if (seed === void 0) | 67 if (seed === void 0) |
| 68 seed = null; | 68 seed = null; |
| 69 return seed == null ? new _JSRandom() : new _Random(seed); | 69 return seed == null ? new _JSRandom() : new _Random(seed); |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 let _RectangleBase$ = dart.generic(function(T) { | 72 let _RectangleBase$ = dart.generic(function(T) { |
| 73 class _RectangleBase extends core.Object { | 73 class _RectangleBase extends core.Object { |
| 74 _RectangleBase() { | 74 _RectangleBase() { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 126 } |
| 127 get bottomRight() { | 127 get bottomRight() { |
| 128 return new (Point$(T))(dart.as(this.left['+'](this.width), T), dart.as(t
his.top['+'](this.height), T)); | 128 return new (Point$(T))(dart.as(this.left['+'](this.width), T), dart.as(t
his.top['+'](this.height), T)); |
| 129 } | 129 } |
| 130 get bottomLeft() { | 130 get bottomLeft() { |
| 131 return new (Point$(T))(this.left, dart.as(this.top['+'](this.height), T)
); | 131 return new (Point$(T))(this.left, dart.as(this.top['+'](this.height), T)
); |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 return _RectangleBase; | 134 return _RectangleBase; |
| 135 }); | 135 }); |
| 136 let _RectangleBase = _RectangleBase$(dart.dynamic); | 136 let _RectangleBase = _RectangleBase$(); |
| 137 let Rectangle$ = dart.generic(function(T) { | 137 let Rectangle$ = dart.generic(function(T) { |
| 138 class Rectangle extends _RectangleBase$(T) { | 138 class Rectangle extends _RectangleBase$(T) { |
| 139 Rectangle(left, top, width, height) { | 139 Rectangle(left, top, width, height) { |
| 140 this.left = left; | 140 this.left = left; |
| 141 this.top = top; | 141 this.top = top; |
| 142 this.width = dart.as(width['<'](0) ? dart.notNull(width['unary-']()) * 0
: width, T); | 142 this.width = dart.as(width['<'](0) ? dart.notNull(width['unary-']()) * 0
: width, T); |
| 143 this.height = dart.as(height['<'](0) ? dart.notNull(height['unary-']())
* 0 : height, T); | 143 this.height = dart.as(height['<'](0) ? dart.notNull(height['unary-']())
* 0 : height, T); |
| 144 super._RectangleBase(); | 144 super._RectangleBase(); |
| 145 } | 145 } |
| 146 fromPoints(a, b) { | 146 fromPoints(a, b) { |
| 147 let left = dart.as(min(a.x, b.x), T); | 147 let left = dart.as(min(a.x, b.x), T); |
| 148 let width = dart.as(core.num['-'](max(a.x, b.x), left), T); | 148 let width = dart.as(core.num['-'](max(a.x, b.x), left), T); |
| 149 let top = dart.as(min(a.y, b.y), T); | 149 let top = dart.as(min(a.y, b.y), T); |
| 150 let height = dart.as(core.num['-'](max(a.y, b.y), top), T); | 150 let height = dart.as(core.num['-'](max(a.y, b.y), top), T); |
| 151 return new (Rectangle$(T))(left, top, width, height); | 151 return new (Rectangle$(T))(left, top, width, height); |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 dart.defineNamedConstructor(Rectangle, 'fromPoints'); | 154 dart.defineNamedConstructor(Rectangle, 'fromPoints'); |
| 155 return Rectangle; | 155 return Rectangle; |
| 156 }); | 156 }); |
| 157 let Rectangle = Rectangle$(dart.dynamic); | 157 let Rectangle = Rectangle$(); |
| 158 let _width = Symbol('_width'); | 158 let _width = Symbol('_width'); |
| 159 let _height = Symbol('_height'); | 159 let _height = Symbol('_height'); |
| 160 let MutableRectangle$ = dart.generic(function(T) { | 160 let MutableRectangle$ = dart.generic(function(T) { |
| 161 class MutableRectangle extends _RectangleBase$(T) { | 161 class MutableRectangle extends _RectangleBase$(T) { |
| 162 MutableRectangle(left, top, width, height) { | 162 MutableRectangle(left, top, width, height) { |
| 163 this.left = left; | 163 this.left = left; |
| 164 this.top = top; | 164 this.top = top; |
| 165 this[_width] = dart.as(width['<'](0) ? _clampToZero(width) : width, T); | 165 this[_width] = dart.as(width['<'](0) ? _clampToZero(width) : width, T); |
| 166 this[_height] = dart.as(height['<'](0) ? _clampToZero(height) : height,
T); | 166 this[_height] = dart.as(height['<'](0) ? _clampToZero(height) : height,
T); |
| 167 super._RectangleBase(); | 167 super._RectangleBase(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 187 set height(height) { | 187 set height(height) { |
| 188 if (height['<'](0)) | 188 if (height['<'](0)) |
| 189 height = dart.as(_clampToZero(height), T); | 189 height = dart.as(_clampToZero(height), T); |
| 190 this[_height] = height; | 190 this[_height] = height; |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 MutableRectangle[dart.implements] = () => [Rectangle$(T)]; | 193 MutableRectangle[dart.implements] = () => [Rectangle$(T)]; |
| 194 dart.defineNamedConstructor(MutableRectangle, 'fromPoints'); | 194 dart.defineNamedConstructor(MutableRectangle, 'fromPoints'); |
| 195 return MutableRectangle; | 195 return MutableRectangle; |
| 196 }); | 196 }); |
| 197 let MutableRectangle = MutableRectangle$(dart.dynamic); | 197 let MutableRectangle = MutableRectangle$(); |
| 198 // Function _clampToZero: (num) → num | 198 // Function _clampToZero: (num) → num |
| 199 function _clampToZero(value) { | 199 function _clampToZero(value) { |
| 200 dart.assert(dart.notNull(value) < 0); | 200 dart.assert(dart.notNull(value) < 0); |
| 201 return -dart.notNull(value) * 0; | 201 return -dart.notNull(value) * 0; |
| 202 } | 202 } |
| 203 let E = 2.718281828459045; | 203 let E = 2.718281828459045; |
| 204 let LN10 = 2.302585092994046; | 204 let LN10 = 2.302585092994046; |
| 205 let LN2 = 0.6931471805599453; | 205 let LN2 = 0.6931471805599453; |
| 206 let LOG2E = 1.4426950408889634; | 206 let LOG2E = 1.4426950408889634; |
| 207 let LOG10E = 0.4342944819032518; | 207 let LOG10E = 0.4342944819032518; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 nextBool() { | 420 nextBool() { |
| 421 this[_nextState](); | 421 this[_nextState](); |
| 422 return (dart.notNull(this[_lo]) & 1) == 0; | 422 return (dart.notNull(this[_lo]) & 1) == 0; |
| 423 } | 423 } |
| 424 } | 424 } |
| 425 _Random[dart.implements] = () => [Random]; | 425 _Random[dart.implements] = () => [Random]; |
| 426 _Random._POW2_53_D = 1.0 * 9007199254740992; | 426 _Random._POW2_53_D = 1.0 * 9007199254740992; |
| 427 _Random._POW2_27_D = 1.0 * (1 << 27); | 427 _Random._POW2_27_D = 1.0 * (1 << 27); |
| 428 _Random._MASK32 = 4294967295; | 428 _Random._MASK32 = 4294967295; |
| 429 // Exports: | 429 // Exports: |
| 430 exports.Point$ = Point$; |
| 430 exports.Point = Point; | 431 exports.Point = Point; |
| 431 exports.Point$ = Point$; | |
| 432 exports.Random = Random; | 432 exports.Random = Random; |
| 433 exports.Rectangle$ = Rectangle$; |
| 433 exports.Rectangle = Rectangle; | 434 exports.Rectangle = Rectangle; |
| 434 exports.Rectangle$ = Rectangle$; | 435 exports.MutableRectangle$ = MutableRectangle$; |
| 435 exports.MutableRectangle = MutableRectangle; | 436 exports.MutableRectangle = MutableRectangle; |
| 436 exports.MutableRectangle$ = MutableRectangle$; | |
| 437 exports.E = E; | 437 exports.E = E; |
| 438 exports.LN10 = LN10; | 438 exports.LN10 = LN10; |
| 439 exports.LN2 = LN2; | 439 exports.LN2 = LN2; |
| 440 exports.LOG2E = LOG2E; | 440 exports.LOG2E = LOG2E; |
| 441 exports.LOG10E = LOG10E; | 441 exports.LOG10E = LOG10E; |
| 442 exports.PI = PI; | 442 exports.PI = PI; |
| 443 exports.SQRT1_2 = SQRT1_2; | 443 exports.SQRT1_2 = SQRT1_2; |
| 444 exports.SQRT2 = SQRT2; | 444 exports.SQRT2 = SQRT2; |
| 445 exports.min = min; | 445 exports.min = min; |
| 446 exports.max = max; | 446 exports.max = max; |
| 447 exports.atan2 = atan2; | 447 exports.atan2 = atan2; |
| 448 exports.pow = pow; | 448 exports.pow = pow; |
| 449 exports.sin = sin; | 449 exports.sin = sin; |
| 450 exports.cos = cos; | 450 exports.cos = cos; |
| 451 exports.tan = tan; | 451 exports.tan = tan; |
| 452 exports.acos = acos; | 452 exports.acos = acos; |
| 453 exports.asin = asin; | 453 exports.asin = asin; |
| 454 exports.atan = atan; | 454 exports.atan = atan; |
| 455 exports.sqrt = sqrt; | 455 exports.sqrt = sqrt; |
| 456 exports.exp = exp; | 456 exports.exp = exp; |
| 457 exports.log = log; | 457 exports.log = log; |
| 458 })(math || (math = {})); | 458 })(math || (math = {})); |
| OLD | NEW |