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

Method Compare

decimal.go:1318–1320  ·  view source on GitHub ↗

Compare compares the numbers represented by d and d2 and returns: -1 if d < d2 0 if d == d2 +1 if d > d2

(d2 Decimal)

Source from the content-addressed store, hash-verified

1316// 0 if d == d2
1317// +1 if d > d2
1318func (d Decimal) Compare(d2 Decimal) int {
1319 return d.Cmp(d2)
1320}
1321
1322// Equal returns whether the numbers represented by d and d2 are equal.
1323func (d Decimal) Equal(d2 Decimal) bool {

Callers

nothing calls this directly

Calls 1

CmpMethod · 0.95

Tested by

no test coverage detected