Merge pull request #6660 from neki-dev/master

Fixed jsdoc for GetRandom
This commit is contained in:
Richard Davey 2023-11-08 15:26:40 +00:00 committed by GitHub
commit d9f2891292
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,11 +10,15 @@
* @function Phaser.Utils.Array.GetRandom
* @since 3.0.0
*
* @param {array} array - The array to select the random entry from.
* @generic T
* @genericUse {T[]} - [array]
* @genericUse {T} - [$return]
*
* @param {T[]} array - The array to select the random entry from.
* @param {number} [startIndex=0] - An optional start index.
* @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.
*
* @return {*} A random element from the array, or `null` if no element could be found in the range given.
* @return {T} A random element from the array, or `null` if no element could be found in the range given.
*/
var GetRandom = function (array, startIndex, length)
{