1
0
Fork 0
mirror of https://github.com/kidoman/embd synced 2025-07-03 03:47:33 +02:00

refactoring

This commit is contained in:
Karan Misra 2014-01-05 15:49:03 +05:30
parent 2b67e89fad
commit 7d044a8f0e
3 changed files with 30 additions and 36 deletions

5
util/map.go Normal file
View file

@ -0,0 +1,5 @@
package util
func Map(x, inmin, inmax, outmin, outmax int64) int64 {
return (x-inmin)*(outmax-outmin)/(inmax-inmin) + outmin
}