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 another one'other' to enable comparison operators via Comparable trait.
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_) }
 
// As above but compares the absolute values of the BigDecs.
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 }
9,485

edits