Skip to content

Commit c43128a

Browse files
committed
update package.json
1 parent 9035a6c commit c43128a

File tree

3 files changed

+99
-0
lines changed

3 files changed

+99
-0
lines changed

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

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,102 @@ for ( i = 0; i < 100; i++ ) {
119119

120120
<!-- /.examples -->
121121

122+
123+
<!-- C interface documentation. -->
124+
125+
* * *
126+
127+
<section class="c">
128+
129+
## C APIs
130+
131+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
132+
133+
<section class="intro">
134+
135+
</section>
136+
137+
<!-- /.intro -->
138+
139+
<!-- C usage documentation. -->
140+
141+
<section class="usage">
142+
143+
### Usage
144+
145+
```c
146+
#include "stdlib/math/base/special/minmax.h"
147+
```
148+
149+
#### stdlib_base_minmax( x, y )
150+
151+
Returns the minimum and maximum value.
152+
153+
```c
154+
double out = stdlib_base_minmax( 4.2, 3.14 );
155+
// returns [ 3.14, 4.2 ]
156+
157+
out = stdlib_base_minmax( 0.0, -0.0 );
158+
// returns [ -0.0, 0.0 ]
159+
```
160+
161+
The function accepts the following arguments:
162+
163+
- **x**: `[in] double` input value.
164+
- **y**: `[in] double` input value.
165+
166+
```c
167+
double stdlib_base_minmax( const double x, const double y );
168+
```
169+
170+
</section>
171+
172+
<!-- /.usage -->
173+
174+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
175+
176+
<section class="notes">
177+
178+
</section>
179+
180+
<!-- /.notes -->
181+
182+
<!-- C API usage examples. -->
183+
184+
<section class="examples">
185+
186+
### Examples
187+
188+
```c
189+
#include "stdlib/math/base/special/minmax.h"
190+
#include <stdlib.h>
191+
#include <stdio.h>
192+
193+
int main( void ) {
194+
double x;
195+
double y;
196+
double v;
197+
int i;
198+
199+
for ( i = 0; i < 100; i++ ) {
200+
x = ( ( (double)rand() / (double)RAND_MAX ) * 200.0 ) - 100.0;
201+
y = ( ( (double)rand() / (double)RAND_MAX ) * 200.0 ) - 100.0;
202+
v = stdlib_base_minmax( x, y );
203+
printf( "x: %lf, y: %lf, minmax(x, y): [ %lf, %lf ]\n", x, y, v[0], v[1] );
204+
}
205+
}
206+
```
207+
208+
</section>
209+
210+
<!-- /.examples -->
211+
212+
</section>
213+
214+
<!-- /.c -->
215+
216+
217+
122218
<!-- 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. -->
123219

124220
<section class="references">

lib/node_modules/@stdlib/math/base/special/minmax/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
"benchmark": "./benchmark",
1919
"doc": "./docs",
2020
"example": "./examples",
21+
"include": "./include",
2122
"lib": "./lib",
23+
"src": "./src",
2224
"test": "./test"
2325
},
2426
"types": "./docs/types",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19+
#include "stdlib/math/base/special/minmax.h"
1920
#include "stdlib/math/base/napi/binary.h"
2021

2122
// cppcheck-suppress shadowFunction

0 commit comments

Comments
 (0)