Data update

This commit is contained in:
Ingy döt Net 2025-06-11 20:16:52 -04:00
parent 72eb4943cb
commit 4d5544505c
2347 changed files with 62432 additions and 16731 deletions

View file

@ -0,0 +1,22 @@
MODULE MapRange;
FROM STextIO IMPORT WriteLn, WriteString;
FROM SWholeIO IMPORT WriteInt;
FROM SRealIO IMPORT WriteFixed;
VAR
I: INTEGER;
PROCEDURE MapRange(S, A1, A2, B1, B2: REAL): REAL;
BEGIN
RETURN B1 + (S - A1) * (B2 - B1) / (A2 - A1)
END MapRange;
BEGIN
FOR I := 0 TO 10 DO
WriteInt(I, 2);
WriteString(" maps to ");
WriteFixed(MapRange(FLOAT(I), 0., 10., -1., 0.), 1, 4);
WriteLn;
END;
END MapRange.