Data update
This commit is contained in:
parent
72eb4943cb
commit
4d5544505c
2347 changed files with 62432 additions and 16731 deletions
11
Task/Map-range/RapidQ/map-range.rapidq
Normal file
11
Task/Map-range/RapidQ/map-range.rapidq
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
' Map range
|
||||
DECLARE FUNCTION MapRange (S#, A1#, A2#, B1#, B2#) AS DOUBLE
|
||||
FOR I = 0 TO 10
|
||||
PRINT FORMAT$("%4.1f", I); " maps to ";
|
||||
PRINT FORMAT$("%4.1f", MapRange(I, 0, 10, -1, 0))
|
||||
NEXT I
|
||||
END
|
||||
|
||||
FUNCTION MapRange (S#, A1#, A2#, B1#, B2#) AS DOUBLE
|
||||
MapRange = B1# + (S# - A1#) * (B2# - B1#) / (A2# - A1#)
|
||||
END FUNCTION
|
||||
Loading…
Add table
Add a link
Reference in a new issue