num-traits
num-traits copied to clipboard
Suggestion: Add trait for complex conjugate
There arlready is a trait for the inverse. There should also be a trait to represent the complex conjugate and equivalents. For inbuilt numbers, this would just return the number itself.
For complex numbers, it returns the complex conjugate. For quaternions, it returns the quaternion conjugate. For geometric algebra types, it returns the reverse. And I'd assume, there are more types, where this operation makes sense, but I don't know.
I would call it Conj, Conjugate or Reverse.
There are also conjugates for quadratic integers.