mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
types: fix number() call
This commit is contained in:
parent
2448fa6f83
commit
759dce1d5a
|
@ -13,6 +13,11 @@ func number(v interface{}) fixedpoint.Value {
|
|||
case float64:
|
||||
return fixedpoint.NewFromFloat(tv)
|
||||
|
||||
case int64:
|
||||
return fixedpoint.NewFromInt(tv)
|
||||
case int:
|
||||
return fixedpoint.NewFromInt(int64(tv))
|
||||
|
||||
case string:
|
||||
return fixedpoint.MustNewFromString(tv)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user