MCPcopy
hub / github.com/shopspring/decimal / Mod

Method Mod

decimal.go:673–676  ·  view source on GitHub ↗

Mod returns d % d2.

(d2 Decimal)

Source from the content-addressed store, hash-verified

671
672// Mod returns d % d2.
673func (d Decimal) Mod(d2 Decimal) Decimal {
674 _, r := d.QuoRem(d2, 0)
675 return r
676}
677
678// Pow returns d to the power of d2.
679// When exponent is negative the returned decimal will have maximum precision of PowPrecisionNegativeExponent places after decimal point.

Callers 1

TestDecimal_ModFunction · 0.80

Calls 1

QuoRemMethod · 0.95

Tested by 1

TestDecimal_ModFunction · 0.64