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

18 lines
295 B
C#

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 ) );
}
}
}