| ... | ... | @@ -2489,6 +2489,7 @@ test "null terminated array" { |
| 2489 | 2489 | <p> |
| 2490 | 2490 | Vectors support the same builtin operators as their underlying base types. These operations are performed |
| 2491 | 2491 | element-wise, and return a vector of the same length as the input vectors. This includes: |
| 2492 | </p> |
| 2492 | 2493 | <ul> |
| 2493 | 2494 | <li>Arithmetic ({#syntax#}+{#endsyntax#}, {#syntax#}-{#endsyntax#}, {#syntax#}/{#endsyntax#}, {#syntax#}*{#endsyntax#}, |
| 2494 | 2495 | {#syntax#}@divFloor{#endsyntax#}, {#syntax#}@sqrt{#endsyntax#}, {#syntax#}@ceil{#endsyntax#}, |
| ... | ... | @@ -2497,7 +2498,6 @@ test "null terminated array" { |
| 2497 | 2498 | {#syntax#}|{#endsyntax#}, {#syntax#}~{#endsyntax#}, etc.)</li> |
| 2498 | 2499 | <li>Comparison operators ({#syntax#}<{#endsyntax#}, {#syntax#}>{#endsyntax#}, {#syntax#}=={#endsyntax#}, etc.)</li> |
| 2499 | 2500 | </ul> |
| 2500 | | </p> |
| 2501 | 2501 | <p> |
| 2502 | 2502 | It is prohibited to use a math operator on a mixture of scalars (individual numbers) and vectors. |
| 2503 | 2503 | Zig provides the {#link|@splat#} builtin to easily convert from scalars to vectors, and it supports {#link|@reduce#} |