Map range: Difference between revisions
Content added Content deleted
m (→{{header|RPL}}) |
|||
Line 3,115: | Line 3,115: | ||
(0,10) (-1,0) 4 MAP |
(0,10) (-1,0) 4 MAP |
||
(0,10) (-1,0) 10 MAP |
(0,10) (-1,0) 10 MAP |
||
</pre> |
|||
{{out}} |
|||
<pre> |
|||
3: -1 |
|||
2: -0.6 |
|||
1: 0 |
|||
</pre> |
|||
===Basic RPL code=== |
|||
No local variables, full stack calculation. Shorter, but less practical in use and difficult to read. |
|||
≪ SWAP 3 PICK - |
|||
SWAP 5 PICK - * |
|||
ROT 4 ROLL - / + |
|||
≫ 'MAP' STO |
|||
{{in}} |
|||
<pre> |
|||
0 10 -1 0 0 MAP |
|||
0 10 -1 0 4 MAP |
|||
0 10 -1 0 10 MAP |
|||
</pre> |
</pre> |
||
{{out}} |
{{out}} |