This commit is contained in:
laodaming
2023-06-05 12:21:15 +08:00
parent f7e7e2d85c
commit 19f988eccd
7 changed files with 34 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ import (
)
// 美分转美元
func FentoDollar(price int64) float64 {
func CentoDollar(price int64) float64 {
str := fmt.Sprintf("%.2f", float64(price)/float64(100))
dollar, _ := strconv.ParseFloat(str, 64)
return dollar