mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-06-08 01:57:02 +09:00
Fixed formating, created patch file.
This commit is contained in:
parent
46e8fc0b61
commit
bfed660020
2 changed files with 25 additions and 25 deletions
|
@ -1,12 +1,12 @@
|
|||
--- exercises/109_vectors.zig 2024-11-03 11:17:00.928652000 +1000
|
||||
+++ answers/109_vectors.zig 2024-11-07 13:11:23.838667200 +1000
|
||||
--- 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 {
|
||||
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 abs_diff_vec = @abs(a - b);
|
||||
+ const max_diff = @reduce(.Max, abs_diff_vec);
|
||||
return max_diff;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue