mirror of
https://github.com/kidoman/embd
synced 2024-12-22 21:00:05 +01:00
6 lines
129 B
Go
6 lines
129 B
Go
package util
|
|
|
|
func Map(x, inmin, inmax, outmin, outmax int64) int64 {
|
|
return (x-inmin)*(outmax-outmin)/(inmax-inmin) + outmin
|
|
}
|