public class Cfloat
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Cfloat |
FLT_I
The complex constant (0.0f,1.0f).
|
float |
i
The imaginary part.
|
float |
r
The real part.
|
Constructor and Description |
---|
Cfloat()
Constructs a complex number with zero real and imaginary parts.
|
Cfloat(Cfloat x)
Constructs a copy of the specified complex number.
|
Cfloat(float r)
Constructs a complex number with zero imaginary part.
|
Cfloat(float r,
float i)
Constructs a complex number.
|
Modifier and Type | Method and Description |
---|---|
float |
abs()
Returns the magnitude of this complex number.
|
static float |
abs(Cfloat x)
Returns the magnitude of a complex number.
|
static Cfloat |
add(Cfloat x,
Cfloat y)
Returns the sum x + y.
|
float |
arg()
Returns the argument of this complex number.
|
static float |
arg(Cfloat x)
Returns the argument of a complex number.
|
Cfloat |
conj()
Returns the complex conjugate of this complex number.
|
static Cfloat |
conj(Cfloat x)
Returns the conjugate of x.
|
Cfloat |
conjEquals()
Returns the conjugate z = conj(z), where z is this complex number.
|
Cfloat |
cos()
Returns the cosine of this complex number.
|
static Cfloat |
cos(Cfloat x)
Returns the cosine of a complex number.
|
Cfloat |
cosh()
Returns the hyberbolic cosine of this complex number.
|
static Cfloat |
cosh(Cfloat x)
Returns the hyperbolic cosine of a complex number.
|
static Cfloat |
div(Cfloat x,
Cfloat y)
Returns the quotient x * y.
|
boolean |
equals(java.lang.Object obj) |
Cfloat |
exp()
Returns the exponential of this complex number.
|
static Cfloat |
exp(Cfloat x)
Returns the exponential of a complex number.
|
int |
hashCode() |
Cfloat |
inv()
Returns the complex inverse of this complex number.
|
static Cfloat |
inv(Cfloat x)
Returns the inverse of x.
|
Cfloat |
invEquals()
Returns the inverse z = inv(z), where z is this complex number.
|
boolean |
isImag()
Determines whether this complex number is imaginary (has zero real part).
|
static boolean |
isImag(Cfloat x)
Determines whether x is imaginary (has zero real part).
|
boolean |
isReal()
Determines whether this complex number is real (has zero imaginary part).
|
static boolean |
isReal(Cfloat x)
Determines whether x is real (has zero imaginary part).
|
Cfloat |
log()
Returns the natural logarithm of this complex number.
|
static Cfloat |
log(Cfloat x)
Returns the natural logarithm of a complex number.
|
Cfloat |
log10()
Returns the logarithm base 10 of this complex number.
|
static Cfloat |
log10(Cfloat x)
Returns the logarithm base 10 of a complex number.
|
Cfloat |
minus(Cfloat x)
Returns the difference z - x, where z is this complex number.
|
Cfloat |
minus(float x)
Returns the difference z - x, where z is this complex number.
|
Cfloat |
minusEquals(Cfloat x)
Returns the difference z -= x, where z is this complex number.
|
Cfloat |
minusEquals(float x)
Returns the difference z -= x, where z is this complex number.
|
static Cfloat |
mul(Cfloat x,
Cfloat y)
Returns the product x * y.
|
Cfloat |
neg()
Returns the complex negative of this complex number.
|
static Cfloat |
neg(Cfloat x)
Returns the negative of x.
|
Cfloat |
negEquals()
Returns the negative z = neg(z), where z is this complex number.
|
float |
norm()
Returns the norm of this complex number.
|
static float |
norm(Cfloat x)
Returns the norm of a complex number.
|
Cfloat |
over(Cfloat x)
Returns the quotent z / x, where z is this complex number.
|
Cfloat |
over(float x)
Returns the quotent z / x, where z is this complex number.
|
Cfloat |
overEquals(Cfloat x)
Returns the quotient z /= x, where z is this complex number.
|
Cfloat |
overEquals(float x)
Returns the quotient z /= x, where z is this complex number.
|
Cfloat |
plus(Cfloat x)
Returns the sum z + x, where z is this complex number.
|
Cfloat |
plus(float x)
Returns the sum z + x, where z is this complex number.
|
Cfloat |
plusEquals(Cfloat x)
Returns the sum z += x, where z is this complex number.
|
Cfloat |
plusEquals(float x)
Returns the sum z += x, where z is this complex number.
|
static Cfloat |
polar(float r,
float a)
Returns the complex number (r*cos(a),r*sin(a)).
|
Cfloat |
pow(Cfloat y)
Returns z to the y'th power, where z is this complex number.
|
static Cfloat |
pow(Cfloat x,
Cfloat y)
Returns x to the y'th power.
|
static Cfloat |
pow(Cfloat x,
float y)
Returns x to the y'th power.
|
Cfloat |
pow(float y)
Returns z to the y'th power, where z is this complex number.
|
static Cfloat |
pow(float x,
Cfloat y)
Returns x to the y'th power.
|
Cfloat |
sin()
Returns the sine of this complex number.
|
static Cfloat |
sin(Cfloat x)
Returns the sine of a complex number.
|
Cfloat |
sinh()
Returns the hyberbolic sine of this complex number.
|
static Cfloat |
sinh(Cfloat x)
Returns the hyperbolic sine of a complex number.
|
Cfloat |
sqrt()
Returns the square-root of this complex number.
|
static Cfloat |
sqrt(Cfloat x)
Returns the square root of a complex number.
|
static Cfloat |
sub(Cfloat x,
Cfloat y)
Returns the difference x - y.
|
Cfloat |
tan()
Returns the tangent of this complex number.
|
static Cfloat |
tan(Cfloat x)
Returns the tangent of a complex number.
|
Cfloat |
tanh()
Returns the hyberbolic tangent of this complex number.
|
static Cfloat |
tanh(Cfloat x)
Returns the hyperbolic tangent of a complex number.
|
Cfloat |
times(Cfloat x)
Returns the product z * x, where z is this complex number.
|
Cfloat |
times(float x)
Returns the product z * x, where z is this complex number.
|
Cfloat |
timesEquals(Cfloat x)
Returns the product z *= x, where z is this complex number.
|
Cfloat |
timesEquals(float x)
Returns the product z *= x, where z is this complex number.
|
java.lang.String |
toString() |
public static final Cfloat FLT_I
public float r
public float i
public Cfloat()
public Cfloat(float r)
r
- the real part.public Cfloat(float r, float i)
r
- the real part.i
- the imaginary part.public Cfloat(Cfloat x)
x
- the complex number.public Cfloat plus(Cfloat x)
x
- a complex number.public Cfloat minus(Cfloat x)
x
- a complex number.public Cfloat times(Cfloat x)
x
- a complex number.public Cfloat over(Cfloat x)
x
- a complex number.public Cfloat plus(float x)
x
- a real number.public Cfloat minus(float x)
x
- a real number.public Cfloat times(float x)
x
- a real number.public Cfloat over(float x)
x
- a real number.public Cfloat plusEquals(Cfloat x)
x
- a complex number.public Cfloat minusEquals(Cfloat x)
x
- a complex number.public Cfloat timesEquals(Cfloat x)
x
- a complex number.public Cfloat overEquals(Cfloat x)
x
- a complex number.public Cfloat plusEquals(float x)
x
- a real number.public Cfloat minusEquals(float x)
x
- a real number.public Cfloat timesEquals(float x)
x
- a real number.public Cfloat overEquals(float x)
x
- a real number.public Cfloat conjEquals()
public Cfloat invEquals()
public Cfloat negEquals()
public boolean isReal()
public boolean isImag()
public Cfloat conj()
public Cfloat inv()
public Cfloat neg()
public float abs()
public float arg()
public float norm()
public Cfloat sqrt()
public Cfloat exp()
public Cfloat log()
public Cfloat log10()
public Cfloat pow(float y)
y
- a real number.public Cfloat pow(Cfloat y)
y
- a complex number.public Cfloat sin()
public Cfloat cos()
public Cfloat tan()
public Cfloat sinh()
public Cfloat cosh()
public Cfloat tanh()
public static boolean isReal(Cfloat x)
x
- a complex number.public static boolean isImag(Cfloat x)
x
- a complex number.public static Cfloat conj(Cfloat x)
x
- a complex number.public static Cfloat inv(Cfloat x)
x
- a complex number.public static Cfloat neg(Cfloat x)
x
- a complex number.public static Cfloat polar(float r, float a)
r
- the polar radius.a
- the polar angle.public static Cfloat add(Cfloat x, Cfloat y)
x
- a complex number.y
- a complex number.public static Cfloat sub(Cfloat x, Cfloat y)
x
- a complex number.y
- a complex number.public static Cfloat mul(Cfloat x, Cfloat y)
x
- a complex number.y
- a complex number.public static Cfloat div(Cfloat x, Cfloat y)
x
- a complex number.y
- a complex number.public static float abs(Cfloat x)
x
- a complex number.public static float arg(Cfloat x)
x
- a complex number.public static float norm(Cfloat x)
x
- a complex number.public static Cfloat sqrt(Cfloat x)
x
- a complex number.public static Cfloat exp(Cfloat x)
x
- a complex number.public static Cfloat log(Cfloat x)
x
- a complex number.public static Cfloat log10(Cfloat x)
x
- a complex number.public static Cfloat pow(Cfloat x, float y)
x
- a complex number.y
- a real number.public static Cfloat pow(float x, Cfloat y)
x
- a real number.y
- a complex number.public static Cfloat pow(Cfloat x, Cfloat y)
x
- a complex number.y
- a complex number.public static Cfloat sin(Cfloat x)
x
- a complex number.public static Cfloat cos(Cfloat x)
x
- a complex number.public static Cfloat tan(Cfloat x)
x
- a complex number.public static Cfloat sinh(Cfloat x)
x
- a complex number.public static Cfloat cosh(Cfloat x)
x
- a complex number.public static Cfloat tanh(Cfloat x)
x
- a complex number.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object