RosettaCodeData/Task/Map-range/PARI-GP/map-range.pari

2 lines
57 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
map(r1,r2,x)=r2[1]+(x-r1[1])*(r2[2]-r2[1])/(r1[2]-r1[1])