Skip to content

Commit da7da24

Browse files
committed
fix: enum names
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: passed - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent b9e90e0 commit da7da24

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

lib/node_modules/@stdlib/math/base/special/heaviside/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,27 +195,27 @@ logEachMap( 'H(%0.4f) = %0.4f', x, heaviside );
195195
Evaluates the [Heaviside function][heaviside-function].
196196

197197
```c
198-
double y = stdlib_base_heaviside( 0.0, STDLIB_MATH_HALF_MAXIMUM );
198+
double y = stdlib_base_heaviside( 0.0, STDLIB_BASE_HEAVISIDE_CONTINUITY_HALF_MAXIMUM );
199199
// returns 0.5
200200

201-
y = stdlib_base_heaviside( 0.0, STDLIB_MATH_LEFT_CONTINUOUS );
201+
y = stdlib_base_heaviside( 0.0, STDLIB_BASE_HEAVISIDE_CONTINUITY_LEFT_CONTINUOUS );
202202
// returns 0.0
203203
```
204204

205205
The function accepts the following arguments:
206206

207207
- **x**: `[in] double` input value.
208-
- **continuity**: `[in] STDLIB_MATH_CONTINUITY` continuity option
208+
- **continuity**: `[in] STDLIB_BASE_HEAVISIDE_CONTINUITY` continuity option
209209

210210
The `continuity` parameter may be one of the following values:
211211

212-
- `STDLIB_MATH_HALF_MAXIMUM`: if `x == 0`, the function returns `0.5`.
213-
- `STDLIB_MATH_LEFT_CONTINUOUS`: if `x == 0`, the function returns `0.0`.
214-
- `STDLIB_MATH_RIGHT_CONTINUOUS`: if `x == 0`, the function returns `1.0`.
215-
- `STDLIB_MATH_DISCONTINUOUS`: if `x == 0`, the function returns `NaN`.
212+
- `STDLIB_BASE_HEAVISIDE_CONTINUITY_HALF_MAXIMUM`: if `x == 0`, the function returns `0.5`.
213+
- `STDLIB_BASE_HEAVISIDE_CONTINUITY_LEFT_CONTINUOUS`: if `x == 0`, the function returns `0.0`.
214+
- `STDLIB_BASE_HEAVISIDE_CONTINUITY_RIGHT_CONTINUOUS`: if `x == 0`, the function returns `1.0`.
215+
- `STDLIB_BASE_HEAVISIDE_CONTINUITY_DISCONTINUOUS`: if `x == 0`, the function returns `NaN`.
216216

217217
```c
218-
double stdlib_base_heaviside( const double x, const STDLIB_MATH_CONTINUITY continuity );
218+
double stdlib_base_heaviside( const double x, const STDLIB_BASE_HEAVISIDE_CONTINUITY continuity );
219219
```
220220
221221
</section>
@@ -246,7 +246,7 @@ int main( void ) {
246246
double y;
247247
int i;
248248
for ( i = 0; i < 10; i++ ) {
249-
y = stdlib_base_heaviside( x[ i ], STDLIB_MATH_HALF_MAXIMUM );
249+
y = stdlib_base_heaviside( x[ i ], STDLIB_BASE_HEAVISIDE_CONTINUITY_HALF_MAXIMUM );
250250
printf( "H(%lf) = %lf\n", x[ i ], y );
251251
}
252252
}

lib/node_modules/@stdlib/math/base/special/heaviside/benchmark/c/native/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static double benchmark( void ) {
102102

103103
t = tic();
104104
for ( i = 0; i < ITERATIONS; i++ ) {
105-
y = stdlib_base_heaviside( x[ i%100 ], STDLIB_MATH_HALF_MAXIMUM );
105+
y = stdlib_base_heaviside( x[ i%100 ], STDLIB_BASE_HEAVISIDE_CONTINUITY_HALF_MAXIMUM );
106106
if ( y != y ) {
107107
printf( "should not return NaN\n" );
108108
break;

lib/node_modules/@stdlib/math/base/special/heaviside/examples/c/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int main( void ) {
2525
double y;
2626
int i;
2727
for ( i = 0; i < 10; i++ ) {
28-
y = stdlib_base_heaviside( x[ i ], STDLIB_MATH_HALF_MAXIMUM );
28+
y = stdlib_base_heaviside( x[ i ], STDLIB_BASE_HEAVISIDE_CONTINUITY_HALF_MAXIMUM );
2929
printf( "H(%lf) = %lf\n", x[ i ], y );
3030
}
3131
}

lib/node_modules/@stdlib/math/base/special/heaviside/include/stdlib/math/base/special/heaviside.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,24 @@ extern "C" {
2727
#endif
2828

2929
// Enumeration of function continuity:
30-
typedef enum STDLIB_MATH_CONTINUITY {
30+
typedef enum STDLIB_BASE_HEAVISIDE_CONTINUITY {
3131
// Half-maximum:
32-
STDLIB_MATH_HALF_MAXIMUM = 0,
32+
STDLIB_BASE_HEAVISIDE_CONTINUITY_HALF_MAXIMUM = 0,
3333

3434
// Left-continuous:
35-
STDLIB_MATH_LEFT_CONTINUOUS = 1,
35+
STDLIB_BASE_HEAVISIDE_CONTINUITY_LEFT_CONTINUOUS = 1,
3636

3737
// Right-continuous:
38-
STDLIB_MATH_RIGHT_CONTINUOUS = 2,
38+
STDLIB_BASE_HEAVISIDE_CONTINUITY_RIGHT_CONTINUOUS = 2,
3939

4040
// Discontinuous:
41-
STDLIB_MATH_DISCONTINUOUS = 3
42-
} STDLIB_MATH_CONTINUITY;
41+
STDLIB_BASE_HEAVISIDE_CONTINUITY_DISCONTINUOUS = 3
42+
} STDLIB_BASE_HEAVISIDE_CONTINUITY;
4343

4444
/**
4545
* Evaluates the Heaviside function.
4646
*/
47-
double stdlib_base_heaviside( const double x, const STDLIB_MATH_CONTINUITY continuity );
47+
double stdlib_base_heaviside( const double x, const STDLIB_BASE_HEAVISIDE_CONTINUITY continuity );
4848

4949
#ifdef __cplusplus
5050
}

lib/node_modules/@stdlib/math/base/special/heaviside/src/addon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
3535
STDLIB_NAPI_ARGV( env, info, argv, argc, 2 );
3636
STDLIB_NAPI_ARGV_DOUBLE( env, x, argv, 0 );
3737
STDLIB_NAPI_ARGV_INT32( env, continuity, argv, 1 );
38-
STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_base_heaviside( x, (STDLIB_MATH_CONTINUITY)continuity ), out );
38+
STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_base_heaviside( x, continuity ), out );
3939
return out;
4040
}
4141

lib/node_modules/@stdlib/math/base/special/heaviside/src/main.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
* @return function value
2828
*
2929
* @example
30-
* double y = stdlib_base_heaviside( 0.0, STDLIB_MATH_HALF_MAXIMUM );
30+
* double y = stdlib_base_heaviside( 0.0, STDLIB_BASE_HEAVISIDE_CONTINUITY_HALF_MAXIMUM );
3131
* // returns 0.5
3232
*/
33-
double stdlib_base_heaviside( const double x, const STDLIB_MATH_CONTINUITY continuity ) {
33+
double stdlib_base_heaviside( const double x, const STDLIB_BASE_HEAVISIDE_CONTINUITY continuity ) {
3434
if ( stdlib_base_is_nan( x ) ) {
3535
return 0.0 / 0.0; // NaN
3636
}
@@ -40,13 +40,13 @@ double stdlib_base_heaviside( const double x, const STDLIB_MATH_CONTINUITY conti
4040
// Handle `+-0`...
4141
if ( x == 0.0 ) {
4242
switch ( continuity ) {
43-
case STDLIB_MATH_HALF_MAXIMUM:
43+
case STDLIB_BASE_HEAVISIDE_CONTINUITY_HALF_MAXIMUM:
4444
return 0.5;
45-
case STDLIB_MATH_LEFT_CONTINUOUS:
45+
case STDLIB_BASE_HEAVISIDE_CONTINUITY_LEFT_CONTINUOUS:
4646
return 0.0;
47-
case STDLIB_MATH_RIGHT_CONTINUOUS:
47+
case STDLIB_BASE_HEAVISIDE_CONTINUITY_RIGHT_CONTINUOUS:
4848
return 1.0;
49-
case STDLIB_MATH_DISCONTINUOUS:
49+
case STDLIB_BASE_HEAVISIDE_CONTINUITY_DISCONTINUOUS:
5050
return 0.0 / 0.0; // NaN
5151
default:
5252
return 0.0 / 0.0; // NaN

0 commit comments

Comments
 (0)