diff options
author | Paul Phillips <paulp@improving.org> | 2009-06-10 19:29:51 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-06-10 19:29:51 +0000 |
commit | 6d09e964f74093d66fa6041c10661df279cdab41 (patch) | |
tree | 28dd9399c7b6bfa981d19ee71629c8ddd9ac66f8 /src | |
parent | b9e451ce6e51f0c5f00384d37ab6d3fe335b40f8 (diff) | |
download | scala-6d09e964f74093d66fa6041c10661df279cdab41.tar.gz scala-6d09e964f74093d66fa6041c10661df279cdab41.tar.bz2 scala-6d09e964f74093d66fa6041c10661df279cdab41.zip |
Added some missing methods to BigDecimal.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/BigDecimal.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/library/scala/BigDecimal.scala b/src/library/scala/BigDecimal.scala index 9bae9feb01..a1ae26fc01 100644 --- a/src/library/scala/BigDecimal.scala +++ b/src/library/scala/BigDecimal.scala @@ -187,6 +187,16 @@ class BigDecimal(val bigDecimal: BigDec) extends java.lang.Number { def max (that: BigDecimal): BigDecimal = new BigDecimal(this.bigDecimal.max(that.bigDecimal)) + /** Remainder after dividing this by that. + */ + def remainder (that: BigDecimal): BigDecimal = + new BigDecimal(this.bigDecimal remainder that.bigDecimal) + + /** Returns a BigDecimal whose value is this ** n. + */ + def pow (n: Int): BigDecimal = + new BigDecimal(this.bigDecimal pow n) + /** Returns a BigDecimal whose value is the negation of this BigDecimal */ def unary_- : BigDecimal = new BigDecimal(this.bigDecimal.negate()) |