public class Complex
extends java.lang.Number
| Constructor and Description |
|---|
Complex(double real,
double imag)
Create Complex number.
|
| Modifier and Type | Method and Description |
|---|---|
double |
doubleValue() |
float |
floatValue() |
double |
getImag()
Get imaginary part of complex number.
|
double |
getReal()
Get real part of complex number.
|
int |
intValue() |
long |
longValue() |
java.lang.String |
toString() |
public Complex(double real,
double imag)
real - real partimag - imaginary partpublic double getReal()
public double getImag()
public java.lang.String toString()
toString in class java.lang.Objectpublic int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic double doubleValue()
doubleValue in class java.lang.Number