public class ComplexFloat extends Object
Modifier and Type | Field and Description |
---|---|
static ComplexFloat |
I |
static ComplexFloat |
NEG_I |
static ComplexFloat |
NEG_UNIT |
static ComplexFloat |
UNIT |
static ComplexFloat |
ZERO |
Constructor and Description |
---|
ComplexFloat(float real) |
ComplexFloat(float real,
float imag) |
Modifier and Type | Method and Description |
---|---|
float |
abs()
Return the absolute value
|
ComplexFloat |
add(ComplexFloat c)
Add two complex numbers.
|
ComplexFloat |
add(float c)
Add a real number to a complex number.
|
ComplexFloat |
addi(ComplexFloat c)
Add two complex numbers in-place storing the result in this.
|
ComplexFloat |
addi(ComplexFloat c,
ComplexFloat result)
Add two complex numbers in-place
|
ComplexFloat |
addi(float c)
Add a real number to complex number in-place, storing the result in this.
|
ComplexFloat |
addi(float a,
ComplexFloat result)
Add a real number to a complex number in-place.
|
float |
arg()
Returns the argument of a complex number.
|
ComplexFloat |
conj() |
ComplexFloat |
conji() |
ComplexFloat |
copy(ComplexFloat other) |
ComplexFloat |
div(ComplexFloat c)
Divide two complex numbers
|
ComplexFloat |
div(float v) |
ComplexFloat |
divi(ComplexFloat c) |
ComplexFloat |
divi(ComplexFloat c,
ComplexFloat result)
Divide two complex numbers, in-place
|
ComplexFloat |
divi(float v) |
ComplexFloat |
divi(float v,
ComplexFloat result) |
ComplexFloat |
dup() |
boolean |
eq(ComplexFloat c) |
boolean |
equals(Object o)
Comparing two ComplexFloat values.
|
int |
hashCode() |
float |
imag() |
ComplexFloat |
inv() |
ComplexFloat |
invi() |
boolean |
isImag() |
boolean |
isReal() |
boolean |
isZero() |
ComplexFloat |
mul(ComplexFloat c)
Multiply two complex numbers
|
ComplexFloat |
mul(float v) |
ComplexFloat |
muli(ComplexFloat c) |
ComplexFloat |
muli(ComplexFloat c,
ComplexFloat result)
Multiply two complex numbers, in-place
|
ComplexFloat |
muli(float v) |
ComplexFloat |
muli(float v,
ComplexFloat result) |
boolean |
ne(ComplexFloat c) |
ComplexFloat |
neg() |
ComplexFloat |
negi() |
float |
real() |
ComplexFloat |
set(float real,
float imag) |
ComplexFloat |
sqrt() |
ComplexFloat |
sub(ComplexFloat c)
Subtract two complex numbers
|
ComplexFloat |
sub(float r) |
ComplexFloat |
subi(ComplexFloat c) |
ComplexFloat |
subi(ComplexFloat c,
ComplexFloat result)
Subtract two complex numbers, in-place
|
ComplexFloat |
subi(float a) |
ComplexFloat |
subi(float a,
ComplexFloat result) |
String |
toString() |
public static final ComplexFloat UNIT
public static final ComplexFloat I
public static final ComplexFloat NEG_UNIT
public static final ComplexFloat NEG_I
public static final ComplexFloat ZERO
public ComplexFloat(float real, float imag)
public ComplexFloat(float real)
public ComplexFloat set(float real, float imag)
public float real()
public float imag()
public ComplexFloat dup()
public ComplexFloat copy(ComplexFloat other)
public ComplexFloat addi(ComplexFloat c, ComplexFloat result)
c
- other complex numberresult
- complex number where result is storedpublic ComplexFloat addi(ComplexFloat c)
c
- other complex numberpublic ComplexFloat add(ComplexFloat c)
c
- other complex numberpublic ComplexFloat addi(float a, ComplexFloat result)
a
- real number to addresult
- complex number to hold resultpublic ComplexFloat addi(float c)
c
- real number to addpublic ComplexFloat add(float c)
c
- real number to addpublic ComplexFloat subi(ComplexFloat c, ComplexFloat result)
c
- complex number to subtractresult
- resulting complex numberpublic ComplexFloat subi(ComplexFloat c)
public ComplexFloat sub(ComplexFloat c)
c
- complex number to subtractpublic ComplexFloat subi(float a, ComplexFloat result)
public ComplexFloat subi(float a)
public ComplexFloat sub(float r)
public ComplexFloat muli(ComplexFloat c, ComplexFloat result)
c
- other complex numberresult
- complex number where product is storedpublic ComplexFloat muli(ComplexFloat c)
public ComplexFloat mul(ComplexFloat c)
c
- other complex numberpublic ComplexFloat mul(float v)
public ComplexFloat muli(float v, ComplexFloat result)
public ComplexFloat muli(float v)
public ComplexFloat div(ComplexFloat c)
c
- complex number to divide this bypublic ComplexFloat divi(ComplexFloat c, ComplexFloat result)
c
- complex number to divide this byresult
- complex number to hold resultpublic ComplexFloat divi(ComplexFloat c)
public ComplexFloat divi(float v, ComplexFloat result)
public ComplexFloat divi(float v)
public ComplexFloat div(float v)
public float abs()
public float arg()
public ComplexFloat invi()
public ComplexFloat inv()
public ComplexFloat neg()
public ComplexFloat negi()
public ComplexFloat conji()
public ComplexFloat conj()
public ComplexFloat sqrt()
public boolean equals(Object o)
public boolean eq(ComplexFloat c)
public boolean ne(ComplexFloat c)
public boolean isZero()
public boolean isReal()
public boolean isImag()
Copyright © 2015. All rights reserved.