rokojori_action_library/Runtime/Math/BinomialCoefficient.cs

19 lines
322 B
C#

using System.Collections;
using System.Collections.Generic;
using Godot;
using Rokojori.Extensions;
namespace Rokojori
{
public class BinomoalCoefficent
{
public static float Compute( int n, int k )
{
return MathX.Factorial( n ) / ( MathX.Factorial( k ) * MathX.Factorial( n - k ) );
}
}
}