public class Complex
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
angle
Complex angle : θ in r ei θ
|
static Complex |
I
i
|
private double |
imaginary
Complex imaginary part : b in a + i b
|
private double |
length
Complex length : r in r ei θ
|
static Complex |
MINUS_I
-i
|
static Complex |
MINUS_ONE
-1
|
static Complex |
ONE
1
|
private double |
real
Complex real part : a in a + i b
|
static Complex |
ZERO
0
|
Modifier | Constructor and Description |
---|---|
private |
Complex(double real,
double imaginary,
double angle,
double length)
Create a new instance of Complex
|
Modifier and Type | Method and Description |
---|---|
Complex |
add(Complex complex)
Add this complex to an other one
|
static Complex |
add(Complex complex1,
Complex complex2)
Add 2 complex
|
Complex |
complementary()
Complex complementary.
|
static Complex |
createComplexLengthAngle(double length,
double angle)
Create complex with the form r ei θ
|
static Complex |
createComplexRealImaginary(double real,
double imaginary)
Create complex with the form a + b i
|
Complex |
divide(Complex complex)
Divide with an other complex
|
static Complex |
divide(Complex complex1,
Complex complex2)
Dive 2 complex
|
boolean |
equals(java.lang.Object obj)
Indicates if an object is equals to this complex
Parent documentation: |
double |
getAngle()
Complex angle : θ in r ei θ
|
double |
getImaginary()
Complex imaginary part : b in a + i b
|
double |
getLength()
Complex length : r in r ei θ
|
double |
getReal()
Complex real part : a in a + i b
|
int |
hashCode()
Complex hash code
Parent documentation: |
Complex |
invert()
Complex invert
|
boolean |
isImaginaryPure()
Indicates if the complex is imaginary pure.
|
boolean |
isNul()
Indicates if the complex is zero
|
boolean |
isReal()
Indicates if the complex is a real.
|
Complex |
multiply(Complex complex)
Multiply the complex by an other one
|
static Complex |
multiply(Complex complex1,
Complex complex2)
Multiply 2 complex
|
Complex |
opposite()
Complex opposite
|
Complex |
subtract(Complex complex)
Subtract with an other complex
|
static Complex |
subtract(Complex complex1,
Complex complex2)
Subtract 2 complex
|
public static final Complex I
public static final Complex MINUS_I
public static final Complex MINUS_ONE
public static final Complex ONE
public static final Complex ZERO
private final double angle
private final double imaginary
private final double length
private final double real
private Complex(double real, double imaginary, double angle, double length)
real
- Complex real part : a in a + i bimaginary
- Complex imaginary part : b in a + i b angle
- Complex angle : θ in r ei θlength
- Complex length : r in r ei θpublic static Complex add(Complex complex1, Complex complex2)
complex1
- Complex 1complex2
- Complex 2public static Complex createComplexLengthAngle(double length, double angle)
length
- rangle
- θpublic static Complex createComplexRealImaginary(double real, double imaginary)
real
- aimaginary
- bpublic static Complex divide(Complex complex1, Complex complex2)
complex1
- Numeratorcomplex2
- Denominatorpublic static Complex multiply(Complex complex1, Complex complex2)
complex1
- Complex 1complex2
- Complex 2public static Complex subtract(Complex complex1, Complex complex2)
complex1
- Complex 1complex2
- Complex 2public Complex add(Complex complex)
complex
- Complex to addpublic Complex complementary()
public Complex divide(Complex complex)
complex
- Complex to divide withpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object to compare withtrue
in equalityObject.equals(java.lang.Object)
public double getAngle()
public double getImaginary()
public double getLength()
public double getReal()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public Complex invert()
public boolean isImaginaryPure()
true
if the complex is imaginary pure.public boolean isNul()
true
if the complex is zeropublic boolean isReal()
true
if the complex is a real.public Complex multiply(Complex complex)
complex
- Complex to multiply withpublic Complex opposite()