Vector: Difference between revisions
Content added Content deleted
m (Simplify swift) |
(add bqn) |
||
Line 166: | Line 166: | ||
a/2 : [2.5000, 3.5000] |
a/2 : [2.5000, 3.5000] |
||
</pre> |
</pre> |
||
=={{header|BQN}}== |
|||
BQN's arrays are treated like vectors by default, and all arithmetic operations vectorize when given appropriate length arguments. This means that vector functionality is a builtin-in feature of BQN. |
|||
<lang bqn> 5‿7 + 2‿3 |
|||
⟨7 10⟩ |
|||
5‿7 - 2‿3 |
|||
⟨3 4⟩ |
|||
5‿7 × 11 |
|||
⟨55 77⟩ |
|||
5‿7 ÷ 2 |
|||
⟨2.5 3.5⟩</lang> |
|||
=={{header|C}}== |
=={{header|C}}== |