Blog post
Complex number
Since a complex number is comprised of a real and imaginary component, two complex numbers are equal if and only if their respective real and imaginary components are equal.
Complex number
Complex.swift {% highlight swift %} struct Complex<T: SignedNumberType> { let real: T let imaginary: T } {% endhighlight %}
{% highlight swift %} extension Complex: Equatable {}
// MARK: Equatable
func ==