XVisuals/utility.go

14 lines
154 B
Go
Raw Permalink Normal View History

2024-10-22 18:34:39 +00:00
package main
import (
"math"
)
func ToUint16(f float64) uint16 {
if f > 65535 {
return uint16(math.Mod(f, 65535))
} else {
return uint16(f)
}
}