Simplify Equals and Cmp godoc comments.

This commit is contained in:
Casey Marshall 2015-03-23 16:41:30 -05:00
parent 605289b720
commit d589a882a7

View file

@ -269,8 +269,7 @@ func (d Decimal) Div(d2 Decimal) Decimal {
return ret return ret
} }
// Cmp compares d and d2 and returns -1, 0 or 1. // Cmp compares the numbers represented by d and d2 and returns:
// The smallest scale of d and d2 are used in comparison.
// //
// -1 if d < d2 // -1 if d < d2
// 0 if d == d2 // 0 if d == d2
@ -284,7 +283,7 @@ func (d Decimal) Cmp(d2 Decimal) int {
return rd.value.Cmp(rd2.value) return rd.value.Cmp(rd2.value)
} }
// Equals returns whether d == d2 at the smallest scale among d and d2. // Equals returns whether the numbers represented by d and d2 are equal.
func (d Decimal) Equals(d2 Decimal) bool { func (d Decimal) Equals(d2 Decimal) bool {
return d.Cmp(d2) == 0 return d.Cmp(d2) == 0
} }