Answers for "map float"

C++
0

map float

float map(float x, float in_min, float in_max, float out_min, float out_max) {
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
Posted by: Guest on January-23-2022

Browse Popular Code Answers by Language