Skip to content

Commit

Permalink
refactor: add missing jsdoc inside calculateRank.js (#3155)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty541 authored Aug 28, 2023
1 parent 5574fd2 commit ecf1db6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/calculateRank.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
/**
* Calculates the exponential cdf.
*
* @param {number} x The value.
* @returns {number} The exponential cdf.
*/
function exponential_cdf(x) {
return 1 - 2 ** -x;
}

/**
* Calculates the log normal cdf.
*
* @param {number} x The value.
* @returns {number} The log normal cdf.
*/
function log_normal_cdf(x) {
// approximation
return x / (1 + x);
Expand Down

0 comments on commit ecf1db6

Please sign in to comment.