mirror of
https://github.com/shopspring/decimal.git
synced 2024-11-22 20:40:48 +01:00
Comment for rescale added
This commit is contained in:
parent
b836e56a4d
commit
7416128977
1 changed files with 4 additions and 0 deletions
|
@ -378,6 +378,10 @@ func (d Decimal) rescale(exp int32) Decimal {
|
|||
}
|
||||
}
|
||||
|
||||
// abs64 returns the absolute value of int64
|
||||
// except the lowest possible int64 value -9223372036854775808
|
||||
// that has no positive counterpart in int64 range
|
||||
// and it is returned unchanged
|
||||
func abs64(n int64) int64 {
|
||||
y := n >> 63
|
||||
return (n ^ y) - y
|
||||
|
|
Loading…
Reference in a new issue