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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 if (!(typeof a == 'number')) dart.throw(new core.ArgumentError(a)); | 262 if (!(typeof a == 'number')) dart.throw(new core.ArgumentError(a)); |
263 if (!(typeof b == 'number')) dart.throw(new core.ArgumentError(b)); | 263 if (!(typeof b == 'number')) dart.throw(new core.ArgumentError(b)); |
264 if (dart.notNull(a) > dart.notNull(b)) return b; | 264 if (dart.notNull(a) > dart.notNull(b)) return b; |
265 if (dart.notNull(a) < dart.notNull(b)) return a; | 265 if (dart.notNull(a) < dart.notNull(b)) return a; |
266 if (typeof b == 'number') { | 266 if (typeof b == 'number') { |
267 if (typeof a == 'number') { | 267 if (typeof a == 'number') { |
268 if (a == 0.0) { | 268 if (a == 0.0) { |
269 return (dart.notNull(a) + dart.notNull(b)) * dart.notNull(a) * dart.no
tNull(b); | 269 return (dart.notNull(a) + dart.notNull(b)) * dart.notNull(a) * dart.no
tNull(b); |
270 } | 270 } |
271 } | 271 } |
272 if (a == 0 && dart.notNull(b.isNegative) || dart.notNull(b.isNaN)) return
b; | 272 if (a == 0 && dart.notNull(b[dartx.isNegative]) || dart.notNull(b[dartx.is
NaN])) return b; |
273 return a; | 273 return a; |
274 } | 274 } |
275 return a; | 275 return a; |
276 } | 276 } |
277 dart.fn(min, () => dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart
.dynamic])); | 277 dart.fn(min, () => dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart
.dynamic])); |
278 function max(a, b) { | 278 function max(a, b) { |
279 if (!(typeof a == 'number')) dart.throw(new core.ArgumentError(a)); | 279 if (!(typeof a == 'number')) dart.throw(new core.ArgumentError(a)); |
280 if (!(typeof b == 'number')) dart.throw(new core.ArgumentError(b)); | 280 if (!(typeof b == 'number')) dart.throw(new core.ArgumentError(b)); |
281 if (dart.notNull(a) > dart.notNull(b)) return a; | 281 if (dart.notNull(a) > dart.notNull(b)) return a; |
282 if (dart.notNull(a) < dart.notNull(b)) return b; | 282 if (dart.notNull(a) < dart.notNull(b)) return b; |
283 if (typeof b == 'number') { | 283 if (typeof b == 'number') { |
284 if (typeof a == 'number') { | 284 if (typeof a == 'number') { |
285 if (a == 0.0) { | 285 if (a == 0.0) { |
286 return dart.notNull(a) + dart.notNull(b); | 286 return dart.notNull(a) + dart.notNull(b); |
287 } | 287 } |
288 } | 288 } |
289 if (dart.notNull(b.isNaN)) return b; | 289 if (dart.notNull(b[dartx.isNaN])) return b; |
290 return a; | 290 return a; |
291 } | 291 } |
292 if (b == 0 && dart.notNull(a.isNegative)) return b; | 292 if (b == 0 && dart.notNull(a[dartx.isNegative])) return b; |
293 return a; | 293 return a; |
294 } | 294 } |
295 dart.fn(max, () => dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart
.dynamic])); | 295 dart.fn(max, () => dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart
.dynamic])); |
296 function atan2(a, b) { | 296 function atan2(a, b) { |
297 return Math.atan2(_js_helper.checkNum(a), _js_helper.checkNum(b)); | 297 return Math.atan2(_js_helper.checkNum(a), _js_helper.checkNum(b)); |
298 } | 298 } |
299 dart.fn(atan2, core.double, [core.num, core.num]); | 299 dart.fn(atan2, core.double, [core.num, core.num]); |
300 function pow(x, exponent) { | 300 function pow(x, exponent) { |
301 _js_helper.checkNum(x); | 301 _js_helper.checkNum(x); |
302 _js_helper.checkNum(exponent); | 302 _js_helper.checkNum(exponent); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 exports.sin = sin; | 502 exports.sin = sin; |
503 exports.cos = cos; | 503 exports.cos = cos; |
504 exports.tan = tan; | 504 exports.tan = tan; |
505 exports.acos = acos; | 505 exports.acos = acos; |
506 exports.asin = asin; | 506 exports.asin = asin; |
507 exports.atan = atan; | 507 exports.atan = atan; |
508 exports.sqrt = sqrt; | 508 exports.sqrt = sqrt; |
509 exports.exp = exp; | 509 exports.exp = exp; |
510 exports.log = log; | 510 exports.log = log; |
511 }); | 511 }); |
OLD | NEW |