You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package decimal
|
|
|
|
import (
|
|
"fmt"
|
|
"strconv"
|
|
)
|
|
|
|
// Decimal 四舍五入
|
|
func Decimal(value float64) float64 {
|
|
value, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", value), 64)
|
|
return value
|
|
}
|