@SerialVersionUID(0L)
final case class Complex[@specialized(Float, Double) T](real: T, imag: T) extends ScalaNumber with ScalaNumericConversions with Serializable
Complex numbers. Depending on the underlying scalar T, can represent the Gaussian integers (T = BigInt/SafeLong), the Gaussian rationals (T = Rational) or the complex number field (T: Field).
Note that we require T to be at least CRing, a commutative ring, so the implementation below is slightly less general than the Cayley-Dickson construction.
- Companion:
- object
trait Product
trait Equals
trait ScalaNumericConversions
class ScalaNumber
class Number
trait Serializable
class Object
trait Matchable
class Any
Complex[T]