Package jscl.math.numeric
Class Complex
- java.lang.Object
-
- jscl.math.numeric.Numeric
-
- jscl.math.numeric.Complex
-
- All Implemented Interfaces:
java.lang.Comparable,jscl.editor.rendering.MathObject,Arithmetic
public final class Complex extends Numeric
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Complexadd(Complex complex)Numericadd(Numeric numeric)doubleangle()intcompareTo(Complex complex)intcompareTo(Numeric numeric)Numericconjugate()Complexdivide(Complex complex)Numericdivide(Numeric numeric)Numericexp()doubleimaginaryPart()Numericinverse()Numericlog()doublemagnitude()doublemagnitude2()Complexmultiply(Complex complex)Numericmultiply(Numeric numeric)Numericnegate()doublerealPart()intsignum()Complexsubtract(Complex complex)Numericsubtract(Numeric numeric)java.lang.StringtoMathML()java.lang.StringtoString()Complexvalueof(Complex complex)Numericvalueof(Numeric numeric)static ComplexvalueOf(double real, double imag)
-
-
-
Method Detail
-
divide
public Complex divide(Complex complex) throws java.lang.ArithmeticException
- Throws:
java.lang.ArithmeticException
-
magnitude
public double magnitude()
-
magnitude2
public double magnitude2()
-
angle
public double angle()
-
realPart
public double realPart()
-
imaginaryPart
public double imaginaryPart()
-
compareTo
public int compareTo(Complex complex)
-
valueOf
public static Complex valueOf(double real, double imag)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toMathML
public java.lang.String toMathML()
-
-