object Complex extends Serializable
The Complex
companion object defines the origin (zero) and the fourth roots
of unity as well as some utility functions.
- Alphabetic
- By Inheritance
- Complex
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val _0: Complex
Zero (0) as a Complex number
- val _1: Complex
One (1) as a Complex number
- val _1n: Complex
Negative one (-1) as a Complex number
- val _i: Complex
Imaginary one (i) as a Complex number
- val _in: Complex
Negative imaginary one (-i) as a Complex number
- def abs(c: Complex): Complex
Return the absolute value of that complex number.
Return the absolute value of that complex number.
- c
that complex number
- def apply(cs: String): Complex
Create a complex number from its primary string representation "a+bi".
Create a complex number from its primary string representation "a+bi". Examples: "2.1+3.2i", "2.1", "3.2i".
- cs
the string form of a complex number
- 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.
- ct
the tuple form of a complex number
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- 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.
- rad
the radius (the length of the vector in the 're-im' plane)
- ang
the angle (the angle of the vector above the 're'-axis)
- def create(cs: String): Complex
Create a complex number from its secondary string representation "(a, b)".
Create a complex number from its secondary string representation "(a, b)". Examples: "(2.1, 3.2)", "(2.1, 0)", "(0, 3.2)".
- cs
the string form of a complex number
- implicit def double2Complex(d: Double): Complex
Implicit conversion from 'Double' to 'Complex'.
Implicit conversion from 'Double' to 'Complex'.
- d
the Double parameter to convert
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def exp(c: Complex): Complex
Return the complex exponenential function of that complex number.
Return the complex exponenential function of that complex number.
- c
that complex number
- See also
www.math.wisc.edu/~angenent/Free-Lecture-Notes/freecomplexnumbers.pdf
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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'.
- c
the first complex number to compare
- d
the second complex number to compare
- 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'.
- c
the first complex number to compare
- d
the second complex number to compare
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- implicit val num: Complex
Implicit numeric value for establishing type
- implicit val ord: Ordering[Complex]
Ordering for complex numbers
- def signum(c: Complex): Complex
Return the complex signum (csgn) of a complex number.
Return the complex signum (csgn) of a complex number. The values may be -1, 0, or 1.
- c
the complex number to obtain the signum of
- 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.
- c
that complex number
- See also
www.mathpropress.com/stan/bibliography/complexSquareRoot.pdf
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated