diff options
| author | Evan Martinez <147688099+Nave55@users.noreply.github.com> | 2024-11-28 00:28:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-28 00:28:26 -0700 |
| commit | 36481f6d4aebf7d5e34ada6cfca996cfb8c31fe4 (patch) | |
| tree | 99de575bdb1f2f07c90d985113178301c22a7843 /core/math | |
| parent | 44124cb639a198092204a0167ef827ea41ad023e (diff) | |
Fix binomial function
Diffstat (limited to 'core/math')
| -rw-r--r-- | core/math/math.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/math.odin b/core/math/math.odin index 0e21afa67..934842318 100644 --- a/core/math/math.odin +++ b/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 |