Skip to content

Commit 0bc68ba

Browse files
committed
feat: update complex/float64/base/assert TypeScript declarations
--- 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: na - 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: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 9f96d8d commit 0bc68ba

File tree

1 file changed

+29
-0
lines changed
  • lib/node_modules/@stdlib/complex/float64/base/assert/docs/types

1 file changed

+29
-0
lines changed

lib/node_modules/@stdlib/complex/float64/base/assert/docs/types/index.d.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
/* eslint-disable max-lines */
2222

23+
import isAlmostEqual = require( '@stdlib/complex/float64/base/assert/is-almost-equal' );
2324
import isEqual = require( '@stdlib/complex/float64/base/assert/is-equal' );
2425
import isNotEqual = require( '@stdlib/complex/float64/base/assert/is-not-equal' );
2526
import isSameValue = require( '@stdlib/complex/float64/base/assert/is-same-value' );
@@ -29,6 +30,34 @@ import isSameValueZero = require( '@stdlib/complex/float64/base/assert/is-same-v
2930
* Interface describing the `assert` namespace.
3031
*/
3132
interface Namespace {
33+
/**
34+
* Tests whether two double-precision complex floating-point numbers are approximately equal within a specified number of ULPs (units in the last place).
35+
*
36+
* ## Notes
37+
*
38+
* - The function returns `false` if either input value has a `NaN` real or imaginary component.
39+
* - The function does not distinguish between `-0` and `+0`, treating them as equal.
40+
*
41+
* @param z1 - first complex number
42+
* @param z2 - second complex number
43+
* @param maxULP - maximum allowed ULP difference
44+
* @returns boolean indicating whether two double-precision complex floating-point numbers are approximately equal within a specified number of ULPs
45+
*
46+
* @example
47+
* var EPS = require( '@stdlib/constants/float64/eps' );
48+
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
49+
*
50+
* var z1 = new Complex128( 1.0, 3.0 );
51+
* var z2 = new Complex128( 1.0+EPS, 3.0 );
52+
*
53+
* var bool = ns.isAlmostEqual( z1, z2, 0 );
54+
* // returns false
55+
*
56+
* bool = ns.isAlmostEqual( z1, z2, 1 );
57+
* // returns true
58+
*/
59+
isAlmostEqual: typeof isAlmostEqual;
60+
3261
/**
3362
* Tests whether two double-precision complex floating-point numbers are equal.
3463
*

0 commit comments

Comments
 (0)