September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -0,0 +1,12 @@
@% = 5 : REM Column width
DIM range{l, h}
DIM A{} = range{}, B{} = range{}
A.l = 0 : A.h = 10
B.l = -1 : B.h = 0
FOR n = 0 TO 10
PRINT n " maps to " FNmaprange(A{}, B{}, n)
NEXT
END
DEF FNmaprange(a{}, b{}, s)
= b.l + (s - a.l) * (b.h - b.l) / (a.h - a.l)

View file

@ -0,0 +1,9 @@
10 REM MAP RANGE
20 REM COMMODORE BASIC 2.0
30 REM ================================
40 A1 = 0 : A2 = 10
50 B1 = -1 : B2 = 0
60 DEF FN MR(S)=B1+(S-A1)*(B2-B1)/(A2-A1)
70 FOR S=0 TO 10
80 PRINT S;"MAPS TO ";FN MR(S)
90 NEXT