prog8/examples/test.p8
Irmen de Jong 9438e996d7 Fixed math.mul16_last_upper().
Added math.lerpw() a LERP routine for words (to complement the existing math.lerp() for bytes)
Described the LERP routines in the library chapter in the docs.
2024-11-12 18:31:24 +01:00

20 lines
354 B
Lua

%import math
%import textio
%option no_sysinit
%zeropage basicsafe
main {
sub start() {
uword v0 = 4000
uword v1 = 60000
for cx16.r1 in 65400 to 65535 {
txt.print_uw(cx16.r1)
txt.spc()
txt.spc()
txt.print_uw(math.lerpw(v0, v1, cx16.r1))
txt.nl()
}
}
}