mirror of
https://github.com/Sandstorm-Station/Sandstorm-Station-13.git
synced 2026-07-17 19:24:11 +01:00
e6e2de2984
Co-authored-by: SandPoot <43283559+SandPoot@users.noreply.github.com>
5 lines
167 B
Plaintext
5 lines
167 B
Plaintext
/proc/percentage_between(x,a,b,centesimal = TRUE)
|
|
if (a > b)
|
|
return percentage_between(x, b, a, centesimal)
|
|
return clamp((x-a)/(b-a),0,1) * (centesimal ? 100 : 1)
|