Skip to content

Commit 35303c0

Browse files
committed
Auto-generated commit
1 parent 685e12d commit 35303c0

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
### Features
1212

13+
- [`6338030`](https://github.com/stdlib-js/stdlib/commit/63380300fa123617bf4d460483ab1e70d2611da3) - update `array/base/assert` TypeScript declarations [(#9196)](https://github.com/stdlib-js/stdlib/pull/9196)
1314
- [`ca51243`](https://github.com/stdlib-js/stdlib/commit/ca5124377589a8051527e4bc3b87173723c88f51) - add `hasAlmostSameValues` to namespace
1415
- [`24426d2`](https://github.com/stdlib-js/stdlib/commit/24426d292e18009d0d4acd3615e8f520b92b0c1b) - add `array/base/assert/has-almost-same-values`
1516
- [`a17f721`](https://github.com/stdlib-js/stdlib/commit/a17f721a3d8edb0702ff7e0f123bc93c1da17914) - update `array/base/assert` TypeScript declarations
@@ -97,6 +98,7 @@ This release closes the following issue:
9798

9899
<details>
99100

101+
- [`6338030`](https://github.com/stdlib-js/stdlib/commit/63380300fa123617bf4d460483ab1e70d2611da3) - **feat:** update `array/base/assert` TypeScript declarations [(#9196)](https://github.com/stdlib-js/stdlib/pull/9196) _(by stdlib-bot)_
100102
- [`de9dec4`](https://github.com/stdlib-js/stdlib/commit/de9dec49411a9f71d800970e9324e87dca52098b) - **docs:** update namespace table of contents [(#9205)](https://github.com/stdlib-js/stdlib/pull/9205) _(by stdlib-bot)_
101103
- [`ca51243`](https://github.com/stdlib-js/stdlib/commit/ca5124377589a8051527e4bc3b87173723c88f51) - **feat:** add `hasAlmostSameValues` to namespace _(by Athan Reines)_
102104
- [`24426d2`](https://github.com/stdlib-js/stdlib/commit/24426d292e18009d0d4acd3615e8f520b92b0c1b) - **feat:** add `array/base/assert/has-almost-same-values` _(by Athan Reines)_

docs/types/index.d.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import contains = require( '@stdlib/array-base-assert-contains' );
2424
import hasAlmostEqualValues = require( '@stdlib/array-base-assert-has-almost-equal-values' );
25+
import hasAlmostSameValues = require( '@stdlib/array-base-assert-has-almost-same-values' );
2526
import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' );
2627
import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' );
2728
import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' );
@@ -95,6 +96,27 @@ interface Namespace {
9596
*/
9697
hasAlmostEqualValues: typeof hasAlmostEqualValues;
9798

99+
/**
100+
* Tests if two arrays have respective elements which are approximately the same value within a specified number of ULPs (units in the last place).
101+
*
102+
* ## Notes
103+
*
104+
* - If provided arrays of unequal length, the function returns `false`.
105+
*
106+
* @param x - first input array
107+
* @param y - second input array
108+
* @param maxULP - maximum allowed ULP difference
109+
* @returns boolean indicating whether both arrays are approximately the same value
110+
*
111+
* @example
112+
* var x = [ 0, 0, 1, 0 ];
113+
* var y = [ 0, 0, 1, 0 ];
114+
*
115+
* var out = ns.hasAlmostSameValues( x, y, 0 );
116+
* // returns true
117+
*/
118+
hasAlmostSameValues: typeof hasAlmostSameValues;
119+
98120
/**
99121
* Tests if two arrays have equal values.
100122
*

0 commit comments

Comments
 (0)