Category talk:Wren-big: Difference between revisions
→Source code: Fixed bug in BigDec comparison methods.
(→Source code: Added some properties to BigInts class for dealing with ranges.) |
(→Source code: Fixed bug in BigDec comparison methods.) |
||
Line 2,247:
copy() { BigDec.new_(_br.copy(), _prec) }
// Compares this BigDec with
compare(other) { (other is BigDec) ? _br.compare(other.br_) : _br.compare(other) }
// As above but compares the absolute values of the BigDecs.▼
compareAbs(other) { _br.compareAbs(other.br_) }▼
▲ compareAbs(other) { (other is BigDec) ? _br.compareAbs(other.br_) : _br.compareAbs(other) }
// Returns this BigDec expressed as a BigInt with any fractional part truncated.
toBigInt { _br.num/_br.den }
|