Shoelace formula for polygonal area: Difference between revisions

Add APL
(Removed useless "import math". Removed useless "$" in "echo $shoelace(points)".)
(Add APL)
Line 189:
30.00
</pre>
 
=={{header|APL}}==
{{works with|Dyalog APL}}
<lang APL>shoelace ← 2÷⍨|∘(((1⊃¨⊢)+.×1⌽2⊃¨⊢)-(1⌽1⊃¨⊢)+.×2⊃¨⊢)</lang>
{{out}}
<pre> shoelace (3 4) (5 11) (12 8) (9 5) (5 6)
30</pre>
 
=={{header|C}}==
2,114

edits