| 99 | } |
| 100 | |
| 101 | Complex Complex::operator/(const Complex &other) const |
| 102 | { |
| 103 | float squaredLen = other.squaredLength(); |
| 104 | if( squaredLen == 0 ) return Complex(0,0); |
| 105 | |
| 106 | return Complex((r*other.r + i*other.i)/squaredLen, (i*other.r - r*other.i)/squaredLen); |
| 107 | } |
| 108 | |
| 109 | //----------------------- |
| 110 | // Swizzle operators |
nothing calls this directly
no test coverage detected