mirror of
https://github.com/josdejong/mathjs.git
synced 2026-02-01 16:07:46 +00:00
fix: #3088 error in the description of the return type of pickRandom
This commit is contained in:
parent
f9ab3a1073
commit
76c4811484
@ -50,8 +50,8 @@ export const createPickRandom = /* #__PURE__ */ factory(name, dependencies, ({ t
|
||||
* @param {Array | Matrix} array A one dimensional array
|
||||
* @param {Int} number An int or float
|
||||
* @param {Array | Matrix} weights An array of ints or floats
|
||||
* @return {number | Array} Returns a single random value from array when number is 1 or undefined.
|
||||
* Returns an array with the configured number of elements when number is > 1.
|
||||
* @return {number | Array} Returns a single random value from array when number is undefined.
|
||||
* Returns an array with the configured number of elements when number is defined.
|
||||
*/
|
||||
return typed(name, {
|
||||
'Array | Matrix': function (possibles) {
|
||||
|
||||
5
types/index.d.ts
vendored
5
types/index.d.ts
vendored
@ -2275,9 +2275,8 @@ export interface MathJsInstance extends MathJsFactory {
|
||||
* @param array A one dimensional array
|
||||
* @param number An int or float
|
||||
* @param weights An array of ints or floats
|
||||
* @returns Returns a single random value from array when number is 1 or
|
||||
* undefined. Returns an array with the configured number of elements
|
||||
* when number is > 1.
|
||||
* @returns Returns a single random value from array when number is undefined.
|
||||
* Returns an array with the configured number of elements when number is defined.
|
||||
*/
|
||||
pickRandom<T>(array: T[]): T
|
||||
pickRandom<T>(array: T[], number: number): T[]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user