Data update
This commit is contained in:
parent
72eb4943cb
commit
4d5544505c
2347 changed files with 62432 additions and 16731 deletions
10
Task/Map-range/ANSI-BASIC/map-range.basic
Normal file
10
Task/Map-range/ANSI-BASIC/map-range.basic
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
100 REM Map range
|
||||
110 DECLARE EXTERNAL FUNCTION MapRange
|
||||
120 FOR I = 0 TO 10
|
||||
130 PRINT USING "## maps to ##.#": I, MapRange(I, 0, 10, -1, 0)
|
||||
140 NEXT I
|
||||
150 END
|
||||
160 REM *****************************************
|
||||
170 EXTERNAL FUNCTION MapRange(S, A1, A2, B1, B2)
|
||||
180 LET MapRange = B1 + (S - A1) * (B2 - B1) / (A2 - A1)
|
||||
190 END FUNCTION
|
||||
Loading…
Add table
Add a link
Reference in a new issue