Mercurial > hg > octave-nkf
diff src/ov-complex.h @ 5110:ea96466f98ea
[project @ 2005-01-19 02:11:53 by jwe]
author | jwe |
---|---|
date | Wed, 19 Jan 2005 02:11:53 +0000 |
parents | e35b034d3523 |
children | deed800e7bef |
line wrap: on
line diff
--- a/src/ov-complex.h +++ b/src/ov-complex.h @@ -28,6 +28,7 @@ #include <iostream> #include <string> +#include "lo-ieee.h" #include "mx-base.h" #include "oct-alloc.h" #include "str-vec.h" @@ -74,6 +75,13 @@ octave_value do_index_op (const octave_value_list& idx, int resize_ok); + octave_value any (int = 0) const + { + return (scalar != Complex (0, 0) + && ! (lo_ieee_isnan (::real (scalar)) + || lo_ieee_isnan (::imag (scalar)))); + } + bool is_complex_scalar (void) const { return true; } bool is_complex_type (void) const { return true; }