Data update

This commit is contained in:
Ingy döt Net 2025-06-11 20:16:52 -04:00
parent 72eb4943cb
commit 4d5544505c
2347 changed files with 62432 additions and 16731 deletions

View file

@ -1,8 +1,10 @@
For i = 0 To 10
Print "f(";i;") maps to ";mapToRange(i, 0, 10, -1, 0)
Next i
End
' map range
for i = 0 to 10
print using("##.#", i); " maps to ";
print using("##.#", mapRange(i, 0, 10, -1, 0))
next i
end
Function mapToRange(value, inputMin, inputMax, outputMin, outputMax)
mapToRange = (((value - inputMin) * (outputMax - outputMin)) / (inputMax - inputMin)) + outputMin
End Function
function mapRange(s, a1, a2, b1, b2)
mapRange = b1 + (s - a1) * (b2 - b1) / (a2 - a1)
end function