Add equality operators
This commit is contained in:
parent
6db1b1e943
commit
e5cd0fc7d1
1 changed files with 2 additions and 0 deletions
|
@ -85,4 +85,6 @@ public:
|
||||||
r = z.r;
|
r = z.r;
|
||||||
i = z.i;
|
i = z.i;
|
||||||
}
|
}
|
||||||
|
const bool operator==(const cnumber &z) const { return r == z.r && i == z.i; }
|
||||||
|
const bool operator!=(const cnumber &z) const { return r != z.r || i != z.i; }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue