소스 검색

Merge pull request #810 from oskarnp/fix-math-factorial

Fix math.factorial()
gingerBill 4 년 전
부모
커밋
9250e4d3df
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      core/math/math.odin

+ 1 - 1
core/math/math.odin

@@ -508,7 +508,7 @@ factorial :: proc(n: int) -> int {
 
 	assert(n >= 0, "parameter must not be negative");
 	assert(n < len(table), "parameter is too large to lookup in the table");
-	return 0;
+	return table[n];
 }
 
 classify_f32 :: proc(x: f32) -> Float_Class {