README.md (1741B)
1 <!-- 2 3 @license Apache-2.0 4 5 Copyright (c) 2018 The Stdlib Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 19 --> 20 21 # isComplex64 22 23 > Test if a value is a [64-bit complex number][@stdlib/complex/float32]. 24 25 <section class="usage"> 26 27 ## Usage 28 29 ```javascript 30 var isComplex64 = require( '@stdlib/assert/is-complex64' ); 31 ``` 32 33 #### isComplex64( value ) 34 35 Tests if a value is a [64-bit complex number][@stdlib/complex/float32]. 36 37 ```javascript 38 var Complex64 = require( '@stdlib/complex/float32' ); 39 40 var x = new Complex64( 1.0, 3.0 ); 41 42 var bool = isComplex64( x ); 43 // returns true 44 ``` 45 46 </section> 47 48 <!-- /.usage --> 49 50 <section class="examples"> 51 52 ## Examples 53 54 <!-- eslint no-undef: "error" --> 55 56 ```javascript 57 var Complex64 = require( '@stdlib/complex/float32' ); 58 var Complex128 = require( '@stdlib/complex/float64' ); 59 var isComplex64 = require( '@stdlib/assert/is-complex64' ); 60 61 var out = isComplex64( new Complex64( 2.0, 2.0 ) ); 62 // returns true 63 64 out = isComplex64( new Complex128( 3.0, 1.0 ) ); 65 // returns false 66 67 out = isComplex64( {} ); 68 // returns false 69 70 out = isComplex64( null ); 71 // returns false 72 ``` 73 74 </section> 75 76 <!-- /.examples --> 77 78 <section class="links"> 79 80 [@stdlib/complex/float32]: https://www.npmjs.com/package/@stdlib/complex-float32 81 82 </section> 83 84 <!-- /.links -->