Vector products: Difference between revisions

Content added Content deleted
(Updated to work with Nim 1.4: replaced "~×" and "~•" with "cross" and "dot" as the infix notation no longer works. Used "strformat". Other miscellaneous changes.)
(Add APL)
Line 270: Line 270:
a x ( b x c ): (-267, 204, -3)
a x ( b x c ): (-267, 204, -3)
</pre>
</pre>

=={{header|APL}}==
{{works with|Dyalog APL}}
<lang APL>dot ← +.×
cross ← 1⌽(⊣×1⌽⊢)-⊢×1⌽⊣</lang>
{{out}}
<lang APL> a←3 4 5
b←4 3 5
c←¯5 ¯12 ¯13
a dot b
49
a cross b
5 5 ¯7
a dot b cross c
6
a cross b cross c
¯267 204 ¯3</lang>


=={{header|AppleScript}}==
=={{header|AppleScript}}==