Quellcode durchsuchen

Merge pull request #1374 from indiscible/fix-mathprod

fix math.prod
gingerBill vor 3 Jahren
Ursprung
Commit
aba6d2e52c
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. 1 0
      core/math/math.odin

+ 1 - 0
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
 	}