Explorar el Código

Merge pull request #1374 from indiscible/fix-mathprod

fix math.prod
gingerBill hace 3 años
padre
commit
aba6d2e52c
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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
 	}