Browse Source

Merge pull request #4531 from Nave55/master

Fix math binomial proc giving wrong result
gingerBill 8 months ago
parent
commit
bb96e54308
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/math/math.odin

+ 1 - 1
core/math/math.odin

@@ -1271,7 +1271,7 @@ binomial :: proc "contextless" (n, k: int) -> int {
 	}
 
 	b := n
-	for i in 2..<k {
+	for i in 2..=k {
 		b = (b * (n+1-i))/i
 	}
 	return b