Vector products: Difference between revisions

Content added Content deleted
(Added PowerShell)
Line 1,225: Line 1,225:


=={{header|J}}==
=={{header|J}}==
Perhaps the most straightforward definition for cross product in J uses rotate multiple and subtract:
Perhaps the most straightforward definition for cross product in J uses rotate multiply and subtract:


<lang j>cross=: (1&|.@[ * 2&|.@]) - 2&|.@[ * 1&|.@]</lang>
<lang j>cross=: (1&|.@[ * 2&|.@]) - 2&|.@[ * 1&|.@]</lang>