Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jan 14, 2024
1 parent 97c49f3 commit faa1a2d
Show file tree
Hide file tree
Showing 26 changed files with 1,124 additions and 315 deletions.
1 change: 0 additions & 1 deletion .github/.keepalive

This file was deleted.

2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Copyright (c) 2016-2023 The Stdlib Authors.
Copyright (c) 2016-2024 The Stdlib Authors.
20 changes: 15 additions & 5 deletions complex128/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,31 @@ var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
/**
* Top-level namespace.
*
* @namespace constants
* @namespace ns
*/
var constants = {};
var ns = {};

/**
* @name NUM_BYTES
* @memberof constants
* @memberof ns
* @readonly
* @constant
* @type {number}
* @see {@link module:@stdlib/constants/complex128/num-bytes}
*/
setReadOnly( constants, 'NUM_BYTES', require( './../../complex128/num-bytes' ) );
setReadOnly( ns, 'NUM_BYTES', require( './../../complex128/num-bytes' ) );

/**
* @name ZERO
* @memberof ns
* @readonly
* @constant
* @type {Complex128}
* @see {@link module:@stdlib/constants/complex128/zero}
*/
setReadOnly( ns, 'ZERO', require( './../../complex128/zero' ) );


// EXPORTS //

module.exports = constants;
module.exports = ns;
104 changes: 104 additions & 0 deletions complex128/zero/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<!--
@license Apache-2.0
Copyright (c) 2024 The Stdlib Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# ZERO

> Double-precision complex floating-point zero.
<section class="usage">

## Usage

```javascript
var COMPLEX128_ZERO = require( '@stdlib/constants/complex128/zero' );
```

#### COMPLEX128_ZERO

Double-precision complex floating-point zero.

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

var re = real( COMPLEX128_ZERO );
// returns 0.0

var im = imag( COMPLEX128_ZERO );
// returns 0.0
```

</section>

<!-- /.usage -->

<section class="examples">

## Examples

<!-- eslint no-undef: "error" -->

```javascript
var real = require( '@stdlib/complex/real' );
var imag = require( '@stdlib/complex/imag' );
var Complex128Array = require( '@stdlib/array/complex128' );
var COMPLEX128_ZERO = require( '@stdlib/constants/complex128/zero' );

var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
// returns <Complex128Array>

var v = x.get( 0 );
// returns <Complex128>

var re = real( v );
// returns 1.0

var im = imag( v );
// returns 2.0

x.fill( COMPLEX128_ZERO );

v = x.get( 0 );
// returns <Complex128>

re = real( v );
// returns 0.0

im = imag( v );
// returns 0.0
```

</section>

<!-- /.examples -->

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

<section class="related">

<!-- /.related -->

<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="links">

</section>

<!-- /.links -->
12 changes: 12 additions & 0 deletions complex128/zero/docs/repl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

{{alias}}
Double-precision complex floating-point zero.

Examples
--------
> {{alias}}
<Complex128>

See Also
--------

37 changes: 37 additions & 0 deletions complex128/zero/docs/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* @license Apache-2.0
*
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// TypeScript Version: 4.1

/// <reference types="@stdlib/types"/>

import { Complex128 } from '@stdlib/types/complex';

/**
* Double-precision complex floating-point zero.
*
* @example
* var zero = COMPLEX128_ZERO;
* // returns <Complex128>
*/
declare const COMPLEX128_ZERO: Complex128;


// EXPORTS //

export = COMPLEX128_ZERO;
28 changes: 28 additions & 0 deletions complex128/zero/docs/types/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* @license Apache-2.0
*
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import COMPLEX128_ZERO = require( './index' );


// TESTS //

// The export is a complex number...
{
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
COMPLEX128_ZERO; // $ExpectType Complex128
}
51 changes: 51 additions & 0 deletions complex128/zero/examples/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

var real = require( '@stdlib/complex/real' );
var imag = require( '@stdlib/complex/imag' );
var Complex128Array = require( '@stdlib/array/complex128' );
var COMPLEX128_ZERO = require( './../lib' );

var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
// returns <Complex128Array>

var v = x.get( 0 );
// returns <Complex128>

var re = real( v );
console.log( re );
// => 1.0

var im = imag( v );
console.log( im );
// => 2.0

x.fill( COMPLEX128_ZERO );

v = x.get( 0 );
// returns <Complex128>

re = real( v );
console.log( re );
// => 0.0

im = imag( v );
console.log( im );
// => 0.0
50 changes: 50 additions & 0 deletions complex128/zero/lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

/**
* Double-precision complex floating-point zero.
*
* @module @stdlib/constants/complex128/zero
* @type {Complex128}
*
* @example
* var COMPLEX128_ZERO = require( '@stdlib/constants/complex128/zero' );
* // returns <Complex128>
*/

// MODULES //

var Complex128 = require( '@stdlib/complex/float64' );


// MAIN //

/**
* Double-precision complex floating-point zero.
*
* @constant
* @type {Complex128}
*/
var COMPLEX128_ZERO = new Complex128( 0.0, 0.0 );


// EXPORTS //

module.exports = COMPLEX128_ZERO;
68 changes: 68 additions & 0 deletions complex128/zero/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "@stdlib/constants/complex128/zero",
"version": "0.0.0",
"description": "Double-precision complex floating-point zero.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
},
"contributors": [
{
"name": "The Stdlib Authors",
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
}
],
"main": "./lib",
"directories": {
"doc": "./docs",
"example": "./examples",
"lib": "./lib",
"test": "./test"
},
"types": "./docs/types",
"scripts": {},
"homepage": "https://github.com/stdlib-js/stdlib",
"repository": {
"type": "git",
"url": "git://github.com/stdlib-js/stdlib.git"
},
"bugs": {
"url": "https://github.com/stdlib-js/stdlib/issues"
},
"dependencies": {},
"devDependencies": {},
"engines": {
"node": ">=0.10.0",
"npm": ">2.7.0"
},
"os": [
"aix",
"darwin",
"freebsd",
"linux",
"macos",
"openbsd",
"sunos",
"win32",
"windows"
],
"keywords": [
"stdlib",
"stdmath",
"constant",
"const",
"mathematics",
"math",
"zero",
"complex",
"cmplx",
"double",
"dbl",
"precision",
"floating-point",
"float64",
"complex128",
"cmplx128"
]
}
Loading

0 comments on commit faa1a2d

Please sign in to comment.