Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Map-range/Forth/map-range-1.fth
Normal file
9
Task/Map-range/Forth/map-range-1.fth
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
\ linear interpolation
|
||||
|
||||
: lerp ( b2 b1 a2 a1 s -- t )
|
||||
fover f-
|
||||
frot frot f- f/
|
||||
frot frot fswap fover f- frot f*
|
||||
f+ ;
|
||||
|
||||
: test 11 0 do 0e -1e 10e 0e i s>f lerp f. loop ;
|
||||
3
Task/Map-range/Forth/map-range-2.fth
Normal file
3
Task/Map-range/Forth/map-range-2.fth
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
: lerp ( o2 r2 r1 o1 s -- t ) fswap f- fswap f/ f* f+ ;
|
||||
|
||||
: test 11 0 do -1e 1e 10e 0e i s>f lerp f. loop ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue