nuclear-plant-sim/assets/shader/math.glsl

6 lines
142 B
Plaintext
Raw Normal View History

2024-07-07 18:30:53 +10:00
float Map(float x, float i_min, float i_max, float o_min, float o_max) {
return (x - i_min) * (o_max - o_min) / (i_max - i_min) + o_min;
}