trim trailing zeros from number. (They are meaningless; the decimal point is tracked independent of the number of digits.)
(a *decimal)
| 69 | // (They are meaningless; the decimal point is tracked |
| 70 | // independent of the number of digits.) |
| 71 | func trim(a *decimal) { |
| 72 | for a.nd > 0 && a.d[a.nd-1] == '0' { |
| 73 | a.nd-- |
| 74 | } |
| 75 | if a.nd == 0 { |
| 76 | a.dp = 0 |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | // Assign v to a. |
| 81 | func (a *decimal) Assign(v uint64) { |
no outgoing calls
no test coverage detected
searching dependent graphs…