7 lines
176 B
Text
7 lines
176 B
Text
function MapRange(atom s, a1, a2, b1, b2)
|
|
return b1+(s-a1)*(b2-b1)/(a2-a1)
|
|
end function
|
|
|
|
for i=0 to 10 by 2 do
|
|
printf(1,"%2d : %g\n",{i,MapRange(i,0,10,-1,0)})
|
|
end for
|