-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
855478c
commit 4bda3e4
Showing
5 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
declare function choiceTrend(options?: number[]): void; | ||
/** | ||
* This function will return the index of the random selected item of a array based in the passed probably | ||
* | ||
* @example choiceTrend([0.25, 0.5, 0.25]); // 1 | ||
* @example choiceTrend([0.5, 0.5]); // 0 | ||
* @example choiceTrend([0.1, 0.9]); // 1 | ||
* @example choiceTrend([0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1]); // 7 | ||
* | ||
* @param {number[]} options | ||
* @returns {number} returns the index of the selected | ||
*/ | ||
export function choiceTrend(options?: number[]): number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters