Skip to content

Commit a283e57

Browse files
authored
chore: apply suggestions from code review
Signed-off-by: Philipp Burckhardt <[email protected]>
1 parent 8369ba6 commit a283e57

File tree

4 files changed

+5
-18
lines changed

4 files changed

+5
-18
lines changed

lib/node_modules/@stdlib/stats/base/dists/rayleigh/skewness/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ int main( void ) {
196196
for ( i = 0; i < 25; i++ ) {
197197
sigma = random_uniform( 0.0, 10.0 );
198198
y = stdlib_base_dists_rayleigh_skewness( sigma );
199-
printf( "σ: %lf, f(x;σ): %lf\n", sigma, y );
199+
printf( "σ: %lf, skew(X,σ): %lf\n", sigma, y );
200200
}
201201
}
202202
```

lib/node_modules/@stdlib/stats/base/dists/rayleigh/skewness/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static double benchmark( void ) {
100100
int i;
101101

102102
for ( i = 0; i < 100; i++ ) {
103-
sigma[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
103+
sigma[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
104104
}
105105

106106
t = tic();

lib/node_modules/@stdlib/stats/base/dists/rayleigh/skewness/src/addon.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@
1919
#include "stdlib/stats/base/dists/rayleigh/skewness.h"
2020
#include "stdlib/math/base/napi/unary.h"
2121

22-
// cppcheck-suppress shadowFunction
2322
STDLIB_MATH_BASE_NAPI_MODULE_D_D( stdlib_base_dists_rayleigh_skewness )

lib/node_modules/@stdlib/stats/base/dists/rayleigh/skewness/src/main.c

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,12 @@ const double STDLIB_CONSTANT_FLOAT64_SQRT_PI = 1.772453850905516027;
2626
/**
2727
* Returns the skewness of a Rayleigh distribution.
2828
*
29-
* @param {NonNegativeNumber} sigma - scale parameter
30-
* @returns {NonNegativeNumber} skewness
29+
* @param sigma scale parameter
30+
* @return skewness
3131
*
3232
* @example
33-
* var v = skewness( 9.0 );
33+
* double v = skewness( 9.0 );
3434
* // returns ~0.631
35-
*
36-
* @example
37-
* var v = skewness( 2.0 );
38-
* // returns ~0.631
39-
*
40-
* @example
41-
* var v = skewness( -0.2 );
42-
* // returns NaN
43-
*
44-
* @example
45-
* var v = skewness( NaN );
46-
* // returns NaN
4735
*/
4836
double stdlib_base_dists_rayleigh_skewness( const double sigma ) {
4937
double SKEWNESS;

0 commit comments

Comments
 (0)