diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2021-12-16 18:34:10 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-16 18:34:10 +0000 |
| commit | aba6d2e52c7fb2c87f05e5e2926e6b245b55bccd (patch) | |
| tree | f6a4986b57149aa0a5cc21314e7f241f608f3cc9 | |
| parent | 4423bc0706a6a1a64cf419720fd65bc723fdf58a (diff) | |
| parent | 4ebdb6740ef041f4b600663b3b597e882c3fc42d (diff) | |
Merge pull request #1374 from indiscible/fix-mathprod
fix math.prod
| -rw-r--r-- | core/math/math.odin | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/math/math.odin b/core/math/math.odin index caaa6f51b..b81598da9 100644 --- a/core/math/math.odin +++ b/core/math/math.odin @@ -1196,6 +1196,7 @@ sum :: proc "contextless" (x: $T/[]$E) -> (res: E) prod :: proc "contextless" (x: $T/[]$E) -> (res: E) where intrinsics.type_is_numeric(E) { + res = 1 for i in x { res *= i } |