mirror of
https://github.com/photonstorm/phaser
synced 2024-12-24 12:03:36 +00:00
19 lines
359 B
JavaScript
19 lines
359 B
JavaScript
var Factorial = require('./Factorial');
|
|
|
|
/**
|
|
* [description]
|
|
*
|
|
* @function Phaser.Math.Bernstein
|
|
* @since 3.0.0
|
|
*
|
|
* @param {number} n - [description]
|
|
* @param {number} i - [description]
|
|
*
|
|
* @return {number} [description]
|
|
*/
|
|
var Bernstein = function (n, i)
|
|
{
|
|
return Factorial(n) / Factorial(i) / Factorial(n - i);
|
|
};
|
|
|
|
module.exports = Bernstein;
|