fix
This commit is contained in:
@@ -5,9 +5,9 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// 美分转美元
|
||||
func CentoDollar(price int64) float64 {
|
||||
str := fmt.Sprintf("%.2f", float64(price)/float64(100))
|
||||
// 厘转美元
|
||||
func CentitoDollar(price int64) float64 {
|
||||
str := fmt.Sprintf("%.3f", float64(price)/float64(1000))
|
||||
dollar, _ := strconv.ParseFloat(str, 64)
|
||||
return dollar
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user