Complex

data class Complex(val re: Double, val im: Double)(source)

Represents double-based complex number.

Constructors

Link copied to clipboard
constructor(re: Number, im: Number)
constructor(re: Number)
constructor(re: Double, im: Double)

Types

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun Complex.div(k: Number): Complex
open operator fun Complex.div(arg: StructureND<Complex>): StructureND<Complex>
open operator fun Complex.div(arg: Complex): Complex
Link copied to clipboard
operator fun Complex.minus(d: Double): Complex

Subtracts real number from complex one.

open operator fun Complex.minus(arg: StructureND<Complex>): StructureND<Complex>
open operator fun Complex.minus(arg: Complex): Complex
open operator fun Complex.minus(other: Number): Complex
Link copied to clipboard
operator fun Complex.plus(d: Double): Complex

Adds real number to complex one.

open operator fun Complex.plus(arg: StructureND<Complex>): StructureND<Complex>
open operator fun Complex.plus(arg: Complex): Complex
open operator fun Complex.plus(other: Number): Complex
Link copied to clipboard
open infix fun Complex.pow(pow: Number): Complex
Link copied to clipboard
open operator fun Complex.times(arg: StructureND<Complex>): StructureND<Complex>
open operator fun Complex.times(arg: Complex): Complex
open operator fun Complex.times(k: Number): Complex
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open operator override fun Complex.unaryMinus(): Complex
Link copied to clipboard
open operator fun Complex.unaryPlus(): Complex

Properties

Link copied to clipboard

This complex's conjugate.

Link copied to clipboard
val im: Double

The imaginary part.

Link copied to clipboard

Absolute value of complex number.

Link copied to clipboard
val re: Double

The real part.

Link copied to clipboard

This complex's reciprocal.

Link copied to clipboard

An angle between vector represented by complex number and X axis.