OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart.core; | 5 part of dart.core; |
6 | 6 |
7 /** | 7 /** |
8 * An arbitrarily large integer. | 8 * An arbitrarily large integer. |
9 * | 9 * |
10 * **Note:** When compiling to JavaScript, integers are | 10 * **Note:** When compiling to JavaScript, integers are |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 * The [exponent] must be non-negative and [modulus] must be | 109 * The [exponent] must be non-negative and [modulus] must be |
110 * positive. | 110 * positive. |
111 */ | 111 */ |
112 int modPow(int exponent, int modulus); | 112 int modPow(int exponent, int modulus); |
113 | 113 |
114 /** | 114 /** |
115 * Returns the modular multiplicative inverse of this integer | 115 * Returns the modular multiplicative inverse of this integer |
116 * modulo [modulus]. | 116 * modulo [modulus]. |
117 * | 117 * |
118 * The [modulus] must be positive. | 118 * The [modulus] must be positive. |
| 119 * Returns 0 if no modular inverse exists. |
119 */ | 120 */ |
120 int modInverse(int modulus); | 121 int modInverse(int modulus); |
121 | 122 |
122 /** Returns true if and only if this integer is even. */ | 123 /** Returns true if and only if this integer is even. */ |
123 bool get isEven; | 124 bool get isEven; |
124 | 125 |
125 /** Returns true if and only if this integer is odd. */ | 126 /** Returns true if and only if this integer is odd. */ |
126 bool get isOdd; | 127 bool get isOdd; |
127 | 128 |
128 /** | 129 /** |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 * var value = int.parse(text, onError: (source) => null); | 293 * var value = int.parse(text, onError: (source) => null); |
293 * if (value == null) ... handle the problem | 294 * if (value == null) ... handle the problem |
294 * | 295 * |
295 * The [onError] function is only invoked if [source] is a [String]. It is | 296 * The [onError] function is only invoked if [source] is a [String]. It is |
296 * not invoked if the [source] is, for example, `null`. | 297 * not invoked if the [source] is, for example, `null`. |
297 */ | 298 */ |
298 external static int parse(String source, | 299 external static int parse(String source, |
299 { int radix, | 300 { int radix, |
300 int onError(String source) }); | 301 int onError(String source) }); |
301 } | 302 } |
OLD | NEW |