math_test.go
350 字节
package utils
import "testing"
func TestDecimal(t *testing.T) {
t.Log(Decimal(1.7999999))
t.Log(Decimal(1.7444444))
t.Log(Decimal(1.7555555))
t.Log(Decimal(1.3555555))
t.Log(Decimal(1.3000001))
t.Log(DecimalToNumber(1.0))
t.Log(DecimalToNumber(1.4))
t.Log(DecimalToNumber(1.5))
t.Log(DecimalToNumber(1.6))
t.Log(DecimalToNumber(99.0))
}