OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import 'dart:fletch._system' as fletch; | 5 import 'dart:fletch._system' as fletch; |
6 | 6 import 'dart:fletch._system' show patch; |
7 const patch = "patch"; | |
8 | 7 |
9 @patch class Random { | 8 @patch class Random { |
10 @patch factory Random([int seed]) { | 9 @patch factory Random([int seed]) { |
11 return new _Random(seed); | 10 return new _Random(seed); |
12 } | 11 } |
13 } | 12 } |
14 | 13 |
15 | 14 |
16 // Implements the same XorShift+ algorithm as random.h. Splits 64 bit values | 15 // Implements the same XorShift+ algorithm as random.h. Splits 64 bit values |
17 // into three 23 bit parts, in order to keep everything in smis. | 16 // into three 23 bit parts, in order to keep everything in smis. |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 218 |
220 @fletch.native external double _sqrt(double x); | 219 @fletch.native external double _sqrt(double x); |
221 | 220 |
222 @fletch.native external double _exp(double x); | 221 @fletch.native external double _exp(double x); |
223 | 222 |
224 @fletch.native external double _log(double x); | 223 @fletch.native external double _log(double x); |
225 | 224 |
226 @fletch.native external double _atan2(double a, double b); | 225 @fletch.native external double _atan2(double a, double b); |
227 | 226 |
228 @fletch.native external double _pow(double x, double exponent); | 227 @fletch.native external double _pow(double x, double exponent); |
OLD | NEW |