File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
lib/node_modules/@stdlib/array/base/assert/docs/types Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 2222
2323import contains = require( '@stdlib/array/base/assert/contains' ) ;
2424import hasAlmostEqualValues = require( '@stdlib/array/base/assert/has-almost-equal-values' ) ;
25+ import hasAlmostSameValues = require( '@stdlib/array/base/assert/has-almost-same-values' ) ;
2526import hasEqualValues = require( '@stdlib/array/base/assert/has-equal-values' ) ;
2627import hasEqualValuesIndexed = require( '@stdlib/array/base/assert/has-equal-values-indexed' ) ;
2728import 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 *
You can’t perform that action at this time.
0 commit comments