Skip to content

Instantly share code, notes, and snippets.

class Complex(internal var real: Int, internal var image: Int) {
operator fun plus(C: Complex): Complex {
return Complex(this.real + C.real, this.image + C.image)
}
operator fun minus(C: Complex): Complex {
return Complex(this.real - C.real, this.image - C.image)
}