diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2024-11-07 14:24:51 +0000 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2024-11-07 14:24:51 +0000 |
| commit | 731a3eb0a6f7a88cf03dcf933e9c5caebdef5bad (patch) | |
| tree | 7d30ba2c23839687a2d45c8711bb3fef106114d8 /patches | |
| parent | 150b3de2995dc0f6da3b03113151488fadab246b (diff) | |
| parent | bfed6600205504a3fd2e3d3922ca5da6995224a7 (diff) | |
Merge pull request 'vectors-addition' (#177) from vectors-addition into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/177
Thank you @bgthompson for this great exercise!
Diffstat (limited to 'patches')
| -rw-r--r-- | patches/patches/109_vectors.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/patches/patches/109_vectors.patch b/patches/patches/109_vectors.patch new file mode 100644 index 0000000..bf18cc0 --- /dev/null +++ b/patches/patches/109_vectors.patch @@ -0,0 +1,13 @@ +--- exercises/109_vectors.zig 2024-11-07 14:57:09.673383618 +0100 ++++ answers/109_vectors.zig 2024-11-07 14:22:59.069150138 +0100 +@@ -121,8 +121,8 @@ + + const Vec4 = @Vector(4, f32); + fn calcMaxPairwiseDiffNew(a: Vec4, b: Vec4) f32 { +- const abs_diff_vec = ???; +- const max_diff = @reduce(???, abs_diff_vec); ++ const abs_diff_vec = @abs(a - b); ++ const max_diff = @reduce(.Max, abs_diff_vec); + return max_diff; + } + |
