Browse Source

Fix binomial function

Evan Martinez 8 months ago
parent
commit
36481f6d4a
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