diff options
| author | lording <mathias.berthonneau@gmail.com> | 2023-06-22 09:48:10 +0000 |
|---|---|---|
| committer | lording <mathias.berthonneau@gmail.com> | 2023-06-22 09:48:10 +0000 |
| commit | 3e502fe69b5151fd963f38b55b15f67fa698deb9 (patch) | |
| tree | fb74c9ee127ff3c3fd54501e399c5be9d69c92cf /exercises/096_memory_allocation.zig | |
| parent | d2d3dfa277e7d2a22ebbaf9b47316363035ed500 (diff) | |
| parent | 9499e12469c7ebc481f73280f7a678415f44561b (diff) | |
Merge branch 'main' into refactor-var-to-const
Diffstat (limited to 'exercises/096_memory_allocation.zig')
| -rw-r--r-- | exercises/096_memory_allocation.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/096_memory_allocation.zig b/exercises/096_memory_allocation.zig index 8e348be..7538ba4 100644 --- a/exercises/096_memory_allocation.zig +++ b/exercises/096_memory_allocation.zig @@ -45,7 +45,7 @@ fn runningAverage(arr: []const f64, avg: []f64) void { for (0.., arr) |index, val| { sum += val; - avg[index] = sum / @intToFloat(f64, index + 1); + avg[index] = sum / @floatFromInt(f64, index + 1); } } |
