phaser/src/math/Bernstein.js

20 lines
359 B
JavaScript
Raw Normal View History

var Factorial = require('./Factorial');
2017-10-06 02:05:01 +00:00
/**
* [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;