mirror of
https://github.com/shopspring/decimal.git
synced 2024-11-22 12:30:49 +01:00
remove arrows to save line space
This commit is contained in:
parent
2acc1d75ba
commit
3d6bb50c86
1 changed files with 5 additions and 5 deletions
10
README.md
10
README.md
|
@ -43,11 +43,11 @@ func main() {
|
|||
|
||||
total := preTax.Mul(taxRate.Add(decimal.NewFromFloat(1)))
|
||||
|
||||
fmt.Println("Subtotal:", subtotal) // => Subtotal: 408.06
|
||||
fmt.Println("Pre-tax:", preTax) // => Pre-tax: 422.3421
|
||||
fmt.Println("Taxes:", total.Sub(preTax)) // => Taxes: 37.482861375
|
||||
fmt.Println("Total:", total) // => Total: 459.824961375
|
||||
fmt.Println("Tax rate:", total.Sub(preTax).Div(preTax)) // => Tax rate: 0.08875
|
||||
fmt.Println("Subtotal:", subtotal) // Subtotal: 408.06
|
||||
fmt.Println("Pre-tax:", preTax) // Pre-tax: 422.3421
|
||||
fmt.Println("Taxes:", total.Sub(preTax)) // Taxes: 37.482861375
|
||||
fmt.Println("Total:", total) // Total: 459.824961375
|
||||
fmt.Println("Tax rate:", total.Sub(preTax).Div(preTax)) // Tax rate: 0.08875
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue