akagik / KoheiUtils

MIT License
0 stars 0 forks source link

remap #6

Open akagik opened 3 years ago

akagik commented 3 years ago

public static float Remap (this float value, float from1, float to1, float from2, float to2) { return (value - from1) / (to1 - from1) * (to2 - from2) + from2; }