1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #pragma once19 20 [MATH_BEGIN_NAMESPACE]21 22 23 class [Complex]24 {25 public:26 27 [Complex]() {}28 [Complex](float real, float imaginary);29 30 float [r];31 float [i];32 33 [Complex] [Conjugate]() const;34 void [Normalize]();35 [Complex] [Normalized]() const;36 float [Length]() const;37 float [LengthSq]() const;38 39 [Complex] [operator +](float real) const;40 [Complex] [operator +](const [Complex] &c) const;41 [Complex] [operator -](float real) const;42 [Complex] [operator -](const [Complex] &c) const;43 [Complex] [operator *](float real) const;44 [Complex] [operator *](const [Complex] &c) const;45 [Complex] [operator /](float real) const;46 [Complex] [operator /](const [Complex] &c) const;47 48 [Complex] &[operator +=](float real);49 [Complex] &[operator +=](const [Complex] &c);50 [Complex] &[operator -=](float real);51 [Complex] &[operator -=](const [Complex] &c);52 [Complex] &[operator *=](float real);53 [Complex] &[operator *=](const [Complex] &c);54 [Complex] &[operator /=](float real);55 [Complex] &[operator /=](const [Complex] &c);56 57 static const [Complex] [zero];58 static const [Complex] [unitOne];59 static const [Complex] [unitI];60 };61 62 #ifdef MATH_QT_INTEROP63 Q_DECLARE_METATYPE([Complex])64 Q_DECLARE_METATYPE([Complex]*)65 #endif66 67 [MATH_END_NAMESPACE] Go back to previous page