ENH: changed definition of complex::one (#1247)

- was historically defined as (1 1), but it is more consistent with
  the concept of one to have a real component only.

  Now defined as (1 0):  1+0i

STYLE: remove obscure '!' operator for complex conjugate

- either use the member function or the '~' operator
This commit is contained in:
Mark Olesen
2019-03-27 08:24:03 +01:00
committed by Andrew Heather
parent f513f8bec6
commit 1788bce0a2
6 changed files with 25 additions and 36 deletions

View File

@ -56,11 +56,10 @@ int main(int argc, char *argv[])
<< "complexVector::one : " << complexVector::one << nl
<< nl;
// Comparison
for (complex c : { complex{1, 0}, complex{1, 2}} )
for (complex c : { complex{1, 0}, complex{1, 2}} )
{
print1(c);
// TDB: allow implicit construct from scalar?
//
// if (c == 1.0)