Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: sdk/lib/core/int.dart

Issue 896393004: Add modPow(int exponent, int modulus) method to int abstract class. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/core/int.dart
===================================================================
--- sdk/lib/core/int.dart (revision 43513)
+++ sdk/lib/core/int.dart (working copy)
@@ -103,6 +103,14 @@
*/
int operator >>(int shiftAmount);
+ /**
+ * Returns this integer to the power of [exponent] modulo [modulus].
+ *
+ * It is an error if [exponent] is negative or if [modulus] is
+ * negative or zero.
Lasse Reichstein Nielsen 2015/02/06 19:57:04 I think we have migrated to writing this as: Th
regis 2015/02/06 21:46:54 Done.
+ */
+ int modPow(int exponent, int modulus);
+
/** Returns true if and only if this integer is even. */
bool get isEven;

Powered by Google App Engine
This is Rietveld 408576698