File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,10 @@ bool PyNumber::is_negative() const {
63
63
bool PyNumber::is_positive () const {
64
64
return PyObject_RichCompareBool (pyobject_, pymodule_->get_zero (), Py_GT) == 1 ;
65
65
}
66
+ // ! \return true if complex
67
+ bool PyNumber::is_complex () const {
68
+ return false ;
69
+ }
66
70
67
71
// ! Addition
68
72
RCP<const Number> PyNumber::add (const Number &other) const {
Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ class PyNumber : public NumberWrapper {
80
80
virtual bool is_negative () const ;
81
81
// ! \return true if positive
82
82
virtual bool is_positive () const ;
83
+ // ! \return true if complex
84
+ virtual bool is_complex () const ;
83
85
// ! return true if the number is an exact representation
84
86
// false if the number is an approximation
85
87
virtual bool is_exact () const { return true ; };
You can’t perform that action at this time.
0 commit comments