Complex

scalation.mathstat.Complex
See theComplex companion class
object Complex

The Complex companion object defines the origin (zero) and the four roots of unity as well as some utility functions.

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Complex.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def abs(c: Complex): Complex

Return the absolute value of that complex number.

Return the absolute value of that complex number.

Value parameters

c

that complex number

Attributes

def apply(ct: (Double, Double)): Complex

Create a complex number from a pair of 'Double's.

Create a complex number from a pair of 'Double's.

Value parameters

ct

the tuple form of a complex number

Attributes

def apply(cs: String): Complex

Create a complex number from its primary string representation "a+bi". Examples: "2.1+3.2i", "2.1", "3.2i".

Create a complex number from its primary string representation "a+bi". Examples: "2.1+3.2i", "2.1", "3.2i".

Value parameters

cs

the string form of a complex number

Attributes

def create(cs: String): Complex

Create a complex number from its secondary string representation "(a, b)". Examples: "(2.1, 3.2)", "(2.1, 0)", "(0, 3.2)".

Create a complex number from its secondary string representation "(a, b)". Examples: "(2.1, 3.2)", "(2.1, 0)", "(0, 3.2)".

Value parameters

cs

the string form of a complex number

Attributes

def create(rad: Double, ang: Double): Complex

Create a complex number from the given polar coordinates.

Create a complex number from the given polar coordinates.

Value parameters

ang

the angle (the angle of the vector above the 're'-axis)

rad

the radius (the length of the vector in the 're-im' plane)

Attributes

def exp(c: Complex): Complex

Return the complex exponenential function of that complex number.

Return the complex exponenential function of that complex number.

Value parameters

c

that complex number

Attributes

See also
def max(c: Complex, d: Complex): Complex

Return the maximum of two complex number, 'c' and 'd'.

Return the maximum of two complex number, 'c' and 'd'.

Value parameters

c

the first complex number to compare

d

the second complex number to compare

Attributes

def min(c: Complex, d: Complex): Complex

Return the minimum of two complex numbers, 'c' and 'd'.

Return the minimum of two complex numbers, 'c' and 'd'.

Value parameters

c

the first complex number to compare

d

the second complex number to compare

Attributes

Return the complex signum (csgn) of a complex number. The values may be -1, 0, or 1.

Return the complex signum (csgn) of a complex number. The values may be -1, 0, or 1.

Value parameters

c

the complex number to obtain the signum of

Attributes

See also

en.wikipedia.org/wiki/Sign_function

def sqrt(c: Complex): Complex

Return the square root of that complex number.

Return the square root of that complex number.

Value parameters

c

that complex number

Attributes

See also

Concrete fields

val _0: Complex

Zero (0) as a Complex number

Zero (0) as a Complex number

Attributes

val _1: Complex

One (1) as a Complex number

One (1) as a Complex number

Attributes

val _1n: Complex

Negative one (-1) as a Complex number

Negative one (-1) as a Complex number

Attributes

val _i: Complex

Imaginary one (i) as a Complex number

Imaginary one (i) as a Complex number

Attributes

val _in: Complex

Negative imaginary one (-i) as a Complex number

Negative imaginary one (-i) as a Complex number

Attributes

val ord: Ordering[Complex]

Ordering for complex numbers

Ordering for complex numbers

Attributes