rj-action-library/Runtime/Math/BinomialCoefficient.cs

18 lines
295 B
C#
Raw Normal View History

2024-11-12 08:03:36 +00:00
using System.Collections;
using System.Collections.Generic;
using Godot;
namespace Rokojori
{
public class BinomoalCoefficent
{
public static float Compute( int n, int k )
{
return MathX.Factorial( n ) / ( MathX.Factorial( k ) * MathX.Factorial( n - k ) );
}
}
}