Skip to content

Commit 429301d

Browse files
committed
docs: update parameter names in uniform entropy documentation
1 parent 444ce3f commit 429301d

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

lib/node_modules/@stdlib/stats/base/dists/uniform/entropy/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ for ( i = 0; i < 10; i++ ) {
159159
#include "stdlib/stats/base/dists/uniform/entropy.h"
160160
```
161161

162-
#### stdlib_base_dists_uniform_entropy( n, p )
162+
#### stdlib_base_dists_uniform_entropy( a, b )
163163

164-
Evaluates the [entropy][entropy] of a [Uniform][uniform-distribution] distribution with `a` the minimum support and `b` the maximum support.
164+
Evaluates the [entropy][entropy] of a [uniform][uniform-distribution] distribution with `a` the minimum support and `b` the maximum support.
165165

166166
```c
167167
double out = stdlib_base_dists_uniform_entropy( 4.0, 12.0 );

lib/node_modules/@stdlib/stats/base/dists/uniform/entropy/examples/c/example.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#include <stdio.h>
2222

2323
static double random_uniform( const double min, const double max ) {
24-
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
25-
return min + ( v*(max-min) );
24+
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
25+
return min + ( v*(max-min) );
2626
}
2727

2828
int main( void ) {

lib/node_modules/@stdlib/stats/base/dists/uniform/entropy/src/main.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@
1919
#include "stdlib/stats/base/dists/uniform/entropy.h"
2020
#include "stdlib/math/base/assert/is_nan.h"
2121
#include "stdlib/math/base/special/ln.h"
22-
#include <math.h>
2322

2423
/**
2524
* Returns the entropy of a uniform distribution.
2625
*
2726
* @param n minimum support
2827
* @param p maximum support
29-
* @returns entropy
28+
* @return entropy
3029
*
3130
* @example
3231
* var v = entropy( 0.0, 1.0 );
@@ -45,7 +44,6 @@
4544
* // returns NaN
4645
*/
4746
double stdlib_base_dists_uniform_entropy( const double a, const double b ) {
48-
4947
if (
5048
stdlib_base_is_nan( a ) ||
5149
stdlib_base_is_nan( b ) ||

0 commit comments

Comments
 (0)