September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
13
Task/Vector-products/Forth/vector-products-2.fth
Normal file
13
Task/Vector-products/Forth/vector-products-2.fth
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
S" fsl-util.fs" REQUIRED
|
||||
: 3f! 3 SWAP }fput ;
|
||||
: vector
|
||||
CREATE
|
||||
HERE 3 DUP FLOAT DUP , * ALLOT SWAP CELL+ }fput
|
||||
DOES>
|
||||
CELL+ ;
|
||||
: >fx@ 0 } F@ ;
|
||||
: >fy@ 1 } F@ ;
|
||||
: >fz@ 2 } F@ ;
|
||||
: .Vector 3 SWAP }fprint ;
|
||||
0e 0e 0e vector pad \ NB: your system will be non-standard after this line
|
||||
\ From here on is identical to the above example
|
||||
Loading…
Add table
Add a link
Reference in a new issue