@stdlib/math-base-special-minabs
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "@stdlib/math-base-special-minabs", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Return the minimum absolute value.", | ||
@@ -17,5 +17,8 @@ "license": "Apache-2.0", | ||
"main": "./lib", | ||
"gypfile": false, | ||
"directories": { | ||
"doc": "./docs", | ||
"include": "./include", | ||
"lib": "./lib", | ||
"src": "./src", | ||
"dist": "./dist" | ||
@@ -34,4 +37,6 @@ }, | ||
"dependencies": { | ||
"@stdlib/math-base-napi-binary": "^0.2.1", | ||
"@stdlib/math-base-special-abs": "^0.2.1", | ||
"@stdlib/math-base-special-min": "^0.2.1" | ||
"@stdlib/math-base-special-min": "^0.2.2", | ||
"@stdlib/utils-library-manifest": "^0.2.1" | ||
}, | ||
@@ -38,0 +43,0 @@ "devDependencies": {}, |
@@ -5,3 +5,3 @@ <!-- | ||
Copyright (c) 2018 The Stdlib Authors. | ||
Copyright (c) 2024 The Stdlib Authors. | ||
@@ -130,2 +130,95 @@ Licensed under the Apache License, Version 2.0 (the "License"); | ||
<!-- C interface documentation. --> | ||
* * * | ||
<section class="c"> | ||
## C APIs | ||
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --> | ||
<section class="intro"> | ||
</section> | ||
<!-- /.intro --> | ||
<!-- C usage documentation. --> | ||
<section class="usage"> | ||
### Usage | ||
```c | ||
#include "stdlib/math/base/special/minabs.h" | ||
``` | ||
#### stdlib_base_minabs( x, y ) | ||
Returns the minimum absolute value. | ||
```c | ||
double out = stdlib_base_minabs( -4.2, 3.14 ); | ||
// returns 3.14 | ||
out = stdlib_base_minabs( 0.0, -0.0 ); | ||
// returns +0.0 | ||
``` | ||
The function accepts the following arguments: | ||
- **x**: `[in] double` input value. | ||
- **y**: `[in] double` input value. | ||
```c | ||
double stdlib_base_minabs( const double x, const double y ); | ||
``` | ||
</section> | ||
<!-- /.usage --> | ||
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> | ||
<section class="notes"> | ||
</section> | ||
<!-- /.notes --> | ||
<!-- C API usage examples. --> | ||
<section class="examples"> | ||
### Examples | ||
```c | ||
#include "stdlib/math/base/special/minabs.h" | ||
#include <stdlib.h> | ||
#include <stdio.h> | ||
int main( void ) { | ||
double x; | ||
double y; | ||
double v; | ||
int i; | ||
for ( i = 0; i < 100; i++ ) { | ||
x = ( ( (double)rand() / (double)RAND_MAX ) * 1000.0 ) - 500.0; | ||
y = ( ( (double)rand() / (double)RAND_MAX ) * 1000.0 ) - 500.0; | ||
v = stdlib_base_minabs( x, y ); | ||
printf( "x: %lf, y: %lf, minabs(x, y): %lf\n", x, y, v ); | ||
} | ||
} | ||
``` | ||
</section> | ||
<!-- /.examples --> | ||
</section> | ||
<!-- /.c --> | ||
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> | ||
@@ -193,4 +286,4 @@ | ||
[test-image]: https://github.com/stdlib-js/math-base-special-minabs/actions/workflows/test.yml/badge.svg?branch=v0.2.1 | ||
[test-url]: https://github.com/stdlib-js/math-base-special-minabs/actions/workflows/test.yml?query=branch:v0.2.1 | ||
[test-image]: https://github.com/stdlib-js/math-base-special-minabs/actions/workflows/test.yml/badge.svg?branch=v0.2.2 | ||
[test-url]: https://github.com/stdlib-js/math-base-special-minabs/actions/workflows/test.yml?query=branch:v0.2.2 | ||
@@ -197,0 +290,0 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-minabs/main.svg |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33645
16
262
328
4