Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 4 additions & 30 deletions lib/node_modules/@stdlib/math/base/special/croundf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,18 @@ Rounds each component of a single-precision complex floating-point number to the

```javascript
var Complex64 = require( '@stdlib/complex/float32/ctor' );
var real = require( '@stdlib/complex/float32/real' );
var imag = require( '@stdlib/complex/float32/imag' );

var v = croundf( new Complex64( -4.2, 5.5 ) );
// returns <Complex64>

var re = real( v );
// returns -4.0

var im = imag( v );
// returns 6.0
// returns <Complex64>[ -4.0, 6.0 ]

v = croundf( new Complex64( 9.99999, 0.1 ) );
// returns <Complex64>

re = real( v );
// returns 10.0

im = imag( v );
// returns 0.0
// returns <Complex64>[ 10.0, 0.0 ]

v = croundf( new Complex64( 0.0, 0.0 ) );
// returns <Complex64>

re = real( v );
// returns 0.0

im = imag( v );
// returns 0.0
// returns <Complex64>[ 0.0, 0.0 ]

v = croundf( new Complex64( NaN, NaN ) );
// returns <Complex64>

re = real( v );
// returns NaN

im = imag( v );
// returns NaN
// returns <Complex64>[ NaN, NaN ]
```

</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
Examples
--------
> var v = {{alias}}( new {{alias:@stdlib/complex/float32/ctor}}( 5.5, 3.3 ) )
<Complex64>
> var re = {{alias:@stdlib/complex/float32/real}}( v )
6.0
> var im = {{alias:@stdlib/complex/float32/imag}}( v )
3.0
<Complex64>[ 6.0, 3.0 ]

See Also
--------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,9 @@ import { Complex64 } from '@stdlib/types/complex';
*
* @example
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
* var real = require( '@stdlib/complex/float32/real' );
* var imag = require( '@stdlib/complex/float32/imag' );
*
* var v = croundf( new Complex64( -4.2, 5.5 ) );
* // returns <Complex64>
*
* var re = real( v );
* // returns -4.0
*
* var im = imag( v );
* // returns 6.0
* // returns <Complex64>[ -4.0, 6.0 ]
*/
declare function croundf( z: Complex64 ): Complex64;

Expand Down
34 changes: 4 additions & 30 deletions lib/node_modules/@stdlib/math/base/special/croundf/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,45 +25,19 @@
*
* @example
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
* var real = require( '@stdlib/complex/float32/real' );
* var imag = require( '@stdlib/complex/float32/imag' );
* var croundf = require( '@stdlib/math/base/special/croundf' );
*
* var v = croundf( new Complex64( -4.2, 5.5 ) );
* // returns <Complex64>
*
* var re = real( v );
* // returns -4.0
*
* var im = imag( v );
* // returns 6.0
* // returns <Complex64>[ -4.0, 6.0 ]
*
* v = croundf( new Complex64( 9.99999, 0.1 ) );
* // returns <Complex64>
*
* re = real( v );
* // returns 10.0
*
* im = imag( v );
* // returns 0.0
* // returns <Complex64>[ 10.0, 0.0 ]
*
* v = croundf( new Complex64( 0.0, 0.0 ) );
* // returns <Complex64>
*
* re = real( v );
* // returns 0.0
*
* im = imag( v );
* // returns 0.0
* // returns <Complex64>[ 0.0, 0.0 ]
*
* v = croundf( new Complex64( NaN, NaN ) );
* // returns <Complex64>
*
* re = real( v );
* // returns NaN
*
* im = imag( v );
* // returns NaN
* // returns <Complex64>[ NaN, NaN ]
*/

// MODULES //
Expand Down
34 changes: 4 additions & 30 deletions lib/node_modules/@stdlib/math/base/special/croundf/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,18 @@ var imag = require( '@stdlib/complex/float32/imag' );
*
* @example
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
* var real = require( '@stdlib/complex/float32/real' );
* var imag = require( '@stdlib/complex/float32/imag' );
*
* var v = croundf( new Complex64( -4.2, 5.5 ) );
* // returns <Complex64>
*
* var re = real( v );
* // returns -4.0
*
* var im = imag( v );
* // returns 6.0
* // returns <Complex64>[ -4.0, 6.0 ]
*
* v = croundf( new Complex64( 9.99999, 0.1 ) );
* // returns <Complex64>
*
* re = real( v );
* // returns 10.0
*
* im = imag( v );
* // returns 0.0
* // returns <Complex64>[ 10.0, 0.0 ]
*
* v = croundf( new Complex64( 0.0, 0.0 ) );
* // returns <Complex64>
*
* re = real( v );
* // returns 0.0
*
* im = imag( v );
* // returns 0.0
* // returns <Complex64>[ 0.0, 0.0 ]
*
* v = croundf( new Complex64( NaN, NaN ) );
* // returns <Complex64>
*
* re = real( v );
* // returns NaN
*
* im = imag( v );
* // returns NaN
* // returns <Complex64>[ NaN, NaN ]
*/
function croundf( z ) {
return new Complex64( roundf( real( z ) ), roundf( imag( z ) ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,9 @@ var addon = require( './../src/addon.node' );
*
* @example
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
* var real = require( '@stdlib/complex/float32/real' );
* var imag = require( '@stdlib/complex/float32/imag' );
*
* var v = croundf( new Complex64( -4.2, 5.5 ) );
* // returns <Complex64>
*
* var re = real( v );
* // returns -4
*
* var im = imag( v );
* // returns 6.0
* // returns <Complex64>[ -4, 6.0 ]
*/
function croundf( z ) {
var v = addon( z );
Expand Down