Skip to content

Commit ee45a06

Browse files
stdlib-botkgryte
andauthored
feat!: update namespace TypeScript declarations
This commit incorporates changes to upstream APIs in their handling of complex numbers. BREAKING CHANGE: refactor complex number APIs To migrate, users should use and handle `Complex128` instances, rather than separate real and imaginary components. PR-URL: #1103 Co-authored-by: Athan Reines <kgryte@gmail.com> Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 7f160b3 commit ee45a06

File tree

1 file changed

+31
-13
lines changed
  • lib/node_modules/@stdlib/math/base/special/docs/types

1 file changed

+31
-13
lines changed

lib/node_modules/@stdlib/math/base/special/docs/types/index.d.ts

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,16 +1584,25 @@ interface Namespace {
15841584
cceilf: typeof cceilf;
15851585

15861586
/**
1587-
* Rounds a complex number to the nearest multiple of `10^n` toward positive infinity.
1587+
* Rounds each component of a double-precision complex number to the nearest multiple of `10^n` toward positive infinity.
15881588
*
1589-
* @param re - real component
1590-
* @param im - imaginary component
1589+
* @param z - input value
15911590
* @param n - integer power of 10
1592-
* @returns real and imaginary components
1591+
* @returns result
15931592
*
15941593
* @example
1595-
* var out = ns.cceiln( 5.555, -3.333, -2 );
1596-
* // returns [ 5.56, -3.33 ]
1594+
* var Complex128 = require( `@stdlib/complex/float64` );
1595+
* var real = require( `@stdlib/complex/real` );
1596+
* var imag = require( `@stdlib/complex/imag` );
1597+
*
1598+
* var v = ns.cceiln( new Complex128( 5.555, -3.333 ), -2 );
1599+
* // returns <Complex128>
1600+
*
1601+
* var re = real( v );
1602+
* // returns 5.56
1603+
*
1604+
* var im = imag( v );
1605+
* // returns -3.33
15971606
*/
15981607
cceiln: typeof cceiln;
15991608

@@ -1914,16 +1923,25 @@ interface Namespace {
19141923
cfloor: typeof cfloor;
19151924

19161925
/**
1917-
* Rounds a complex number to the nearest multiple of `10^n` toward negative infinity.
1926+
* Rounds each component of a double-precision complex floating-point number to the nearest multiple of `10^n` toward negative infinity.
19181927
*
1919-
* @param re - real component
1920-
* @param im - imaginary component
1928+
* @param z - input value
19211929
* @param n - integer power of 10
1922-
* @returns real and imaginary components
1930+
* @returns result
19231931
*
19241932
* @example
1925-
* var out = ns.cfloorn( 5.555, -3.333, -2 );
1926-
* // returns [ 5.55, -3.34 ]
1933+
* var Complex128 = require( `@stdlib/complex/float64` );
1934+
* var real = require( `@stdlib/complex/real` );
1935+
* var imag = require( `@stdlib/complex/imag` );
1936+
*
1937+
* var v = cfloor( new Complex128( 5.555, -3.333 ), -2 );
1938+
* // returns <Complex128>
1939+
*
1940+
* var re = real( v );
1941+
* // returns 5.55
1942+
*
1943+
* var im = imag( v );
1944+
* // returns -3.34
19271945
*/
19281946
cfloorn: typeof cfloorn;
19291947

@@ -3363,7 +3381,7 @@ interface Namespace {
33633381
floorf: typeof floorf;
33643382

33653383
/**
3366-
* Rounds a numeric value to the nearest multiple of `10^n` toward negative infinity.
3384+
* Rounds a double-precision floating-point number to the nearest multiple of `10^n` toward negative infinity.
33673385
*
33683386
* ## Notes
33693387
*

0 commit comments

Comments
 (0)