mirror of
https://github.com/jwetzell/osc-go.git
synced 2026-08-07 08:13:37 +00:00
add osc double type
This commit is contained in:
@@ -71,6 +71,13 @@ func argToTypedArg(rawArg string, oscType string) any {
|
||||
panic(err)
|
||||
}
|
||||
return int64(number)
|
||||
case "d":
|
||||
number, err := strconv.ParseFloat(rawArg, 64)
|
||||
if err != nil {
|
||||
// ... handle error
|
||||
panic(err)
|
||||
}
|
||||
return float64(number)
|
||||
default:
|
||||
fmt.Print("unhandled osc type: ")
|
||||
fmt.Printf("%s.\n", oscType)
|
||||
|
||||
Reference in New Issue
Block a user