| Modifier and Type | Field and Description |
|---|---|
static Complex |
I
|
static Complex |
ONE
One complex having
Re(Complex.getRe()/Complex.setRe(double)) and Im(Complex.getIm()/Complex.setIm(double)) equal to 1. |
static int |
SIZE_OF_COMPLEX
The size of complex.
|
static int |
SIZE_OF_DOUBLE
The size of
double. |
static Complex |
ZERO
Zero complex.
|
| Constructor and Description |
|---|
Complex() |
Complex(Complex c)
Initializes a new instance of the
Complex struct. |
Complex(double real,
double imaginary)
Initializes a new instance of the
Complex struct. |
| Modifier and Type | Method and Description |
|---|---|
static Complex |
add(Complex a,
Complex b)
Adds
a and b. |
static void |
add(Complex a,
Complex b,
Complex[] result)
Adds
a and b. |
static Complex |
add(Complex a,
double s)
Adds
a and s. |
static void |
add(Complex a,
double s,
Complex[] result)
Adds
a and s. |
static boolean |
approxEqual(Complex a,
Complex b)
Checks approximate equality.
|
static boolean |
approxEqual(Complex a,
Complex b,
double tolerance)
Checks approximate equality.
|
Complex |
Clone() |
void |
CloneTo(Complex that) |
static Complex |
cos(Complex a)
Gets Cos of
a. |
Complex |
deepClone()
Clones this instance.
|
static Complex |
divide(Complex a,
Complex b)
Divides
a by b. |
static void |
divide(Complex a,
Complex b,
Complex[] result)
Divides
a by b. |
static Complex |
divide(Complex a,
double s)
Divides
a by s. |
static void |
divide(Complex a,
double s,
Complex[] result)
Divides
a by s. |
static Complex |
divide(double s,
Complex a)
Divides
a by s. |
static void |
divide(double s,
Complex a,
Complex[] result)
Divides
s by a. |
boolean |
equals(Object obj)
Determines whether the specified
Object, is equal to this instance. |
static Complex |
exp(Complex a)
Raises e by
a. |
double |
getIm()
Gets the imaginary part.
|
double |
getMagnitude()
Gets the magnitude.
|
double |
getPhase()
Gets the phase.
|
double |
getRe()
Gets the real part.
|
double |
getSquaredMagnitude()
Gets the squared magnitude.
|
int |
hashCode()
Returns a hash code for this instance.
|
static boolean |
isEquals(Complex obj1,
Complex obj2) |
static Complex |
log(Complex a)
Gets log of
a. |
Complex |
multiply_internalize(double s)
Multiplies by
s. |
static Complex |
multiply(Complex a,
Complex b)
Multiplies
a by b. |
static void |
multiply(Complex a,
Complex b,
Complex[] result)
Multiplies
a by b. |
static Complex |
multiply(Complex a,
double s)
Multiplies
a by s. |
static void |
multiply(Complex a,
double s,
Complex[] result)
Multiplies
a by s. |
static Complex |
negate(Complex a)
Negates
a. |
static Complex |
op_Addition(Complex a,
Complex b)
Implements the operator +.
|
static Complex |
op_Addition(Complex a,
double s)
Implements the operator +.
|
static Complex |
op_Addition(double s,
Complex a)
Implements the operator +.
|
static Complex |
op_Division(Complex a,
Complex b)
Implements the operator /.
|
static Complex |
op_Division(Complex a,
double s)
Implements the operator /.
|
static Complex |
op_Division(double s,
Complex a)
Implements the operator /.
|
static boolean |
op_Equality(Complex a,
Complex b)
Implements the operator ==.
|
static boolean |
op_Inequality(Complex a,
Complex b)
Implements the operator !=.
|
static Complex |
op_Multiply(Complex a,
Complex b)
Implements the operator *.
|
static Complex |
op_Multiply(Complex a,
double s)
Implements the operator *.
|
static Complex |
op_Multiply(double s,
Complex a)
Implements the operator *.
|
static Complex |
op_Subtraction(Complex a,
Complex b)
Implements the operator -.
|
static Complex |
op_Subtraction(Complex a,
double s)
Implements the operator -.
|
static Complex |
op_Subtraction(double s,
Complex a)
Implements the operator -.
|
static Complex |
op_UnaryNegation(Complex a)
Implements the operator -.
|
static Complex |
parse(String s)
Parses the specified
s into a Complex. |
Complex |
set(double re,
double im)
Sets the values and returns itself.
|
void |
setIm(double value)
Sets the imaginary part.
|
void |
setRe(double value)
Sets the real part.
|
static Complex |
sin(Complex a)
Gets Sin of
a. |
static Complex |
sqrt(Complex a)
Gets square root of
a. |
static Complex |
subtract(Complex a,
Complex b)
Subtracts
b from a. |
static void |
subtract(Complex a,
Complex b,
Complex[] result)
Subtracts
b from a. |
static Complex |
subtract(Complex a,
double s)
Subtracts
s from a. |
static void |
subtract(Complex a,
double s,
Complex[] result)
Subtracts
s from a. |
static Complex |
subtract(double s,
Complex a)
Subtracts
s from a. |
static void |
subtract(double s,
Complex a,
Complex[] result)
Subtracts
a from s. |
static Complex |
tan(Complex a)
Gets Tan of
a. |
static Complex |
to_Complex(double value)
Performs an explicit conversion from
double to Complex. |
static Complex |
to_Complex(float value)
Performs an explicit conversion from
float to Complex. |
String |
toString()
Returns a
String that represents this instance. |
static boolean |
tryParse(String s,
Complex[] result)
Tries to parse the specified
s into a Complex. |
public static final int SIZE_OF_DOUBLE
The size of double.
public static final int SIZE_OF_COMPLEX
The size of complex.
public static final Complex ZERO
Zero complex.
public static final Complex ONE
One complex having Re(Complex.getRe()/Complex.setRe(double)) and Im(Complex.getIm()/Complex.setIm(double)) equal to 1.
public static final Complex I
I complex having Im(Complex.getIm()/Complex.setIm(double)) equal to 1.
public Complex()
public Complex(double real,
double imaginary)
Initializes a new instance of the Complex struct.
real - The real part.imaginary - The imaginary part.public static Complex to_Complex(double value)
Performs an explicit conversion from double to Complex.
value - The value.public static Complex to_Complex(float value)
Performs an explicit conversion from float to Complex.
value - The value.public static boolean op_Equality(Complex a, Complex b)
Implements the operator ==.
a - The "a" complex.b - The b complex.public static boolean op_Inequality(Complex a, Complex b)
Implements the operator !=.
a - The "a" complex.b - The b complex.public static Complex op_UnaryNegation(Complex a)
Implements the operator -.
a - The "a" complex.public static Complex op_Addition(Complex a, Complex b)
Implements the operator +.
a - The "a" complex.b - The b complex.public static Complex op_Addition(Complex a, double s)
Implements the operator +.
a - The "a" complex.s - The s value.public static Complex op_Addition(double s, Complex a)
Implements the operator +.
s - The s value.a - The "a" complex.public static Complex op_Subtraction(Complex a, Complex b)
Implements the operator -.
a - The "a" complex.b - The b complex.public static Complex op_Subtraction(Complex a, double s)
Implements the operator -.
a - The "a" complex.s - The s value.public static Complex op_Subtraction(double s, Complex a)
Implements the operator -.
s - The s value.a - The "a" complex.public static Complex op_Multiply(Complex a, Complex b)
Implements the operator *.
a - The "a" complex.b - The b complex.public static Complex op_Multiply(double s, Complex a)
Implements the operator *.
s - The s value.a - The "a" complex.public static Complex op_Multiply(Complex a, double s)
Implements the operator *.
a - The "a" complex.s - The s value.public static Complex op_Division(Complex a, Complex b)
Implements the operator /.
a - The "a" complex.b - The b complex.public static Complex op_Division(Complex a, double s)
Implements the operator /.
a - The "a" complex.s - The s value.public static Complex op_Division(double s, Complex a)
Implements the operator /.
s - The s value.a - The "a" complex.public static Complex add(Complex a, Complex b)
Adds a and b.
a - The "a" complex.b - The b complex.public static Complex add(Complex a, double s)
Adds a and s.
a - The "a" complex.s - The s value.s.public static void add(Complex a, Complex b, Complex[] result)
Adds a and b.
a - The "a" complex.b - The b complex.result - The result.public static void add(Complex a, double s, Complex[] result)
Adds a and s.
a - The "a" complex.s - The s value.result - The result.public static Complex subtract(Complex a, Complex b)
Subtracts b from a.
a - The "a" complex.b - The b complex.public static Complex subtract(Complex a, double s)
Subtracts s from a.
a - The "a" complex.s - The s value.public static Complex subtract(double s, Complex a)
Subtracts s from a.
s - The s value.a - The "a" complex.public static void subtract(Complex a, Complex b, Complex[] result)
Subtracts b from a.
a - The "a" complex.b - The b complex.result - The result.public static void subtract(Complex a, double s, Complex[] result)
Subtracts s from a.
a - The "a" complex.s - The s value.result - The result.public static void subtract(double s,
Complex a,
Complex[] result)
Subtracts a from s.
s - The s value.a - The "a" complex.result - The result.public static Complex multiply(Complex a, Complex b)
Multiplies a by b.
a - The "a" complex.b - The b complex.public static Complex multiply(Complex a, double s)
Multiplies a by s.
a - The "a" complex.s - The s value.public static void multiply(Complex a, Complex b, Complex[] result)
Multiplies a by b.
a - The "a" complex.b - The b complex.result - The result.public static void multiply(Complex a, double s, Complex[] result)
Multiplies a by s.
a - The "a" complex.s - The s value.result - The result.public static Complex divide(Complex a, Complex b)
Divides a by b.
a - The "a" complex.b - The b complex.public static Complex divide(Complex a, double s)
Divides a by s.
a - The "a" complex.s - The s value.com.aspose.ms.System.DivideByZeroException - Can not divide by zero.public static Complex divide(double s, Complex a)
Divides a by s.
s - The s value.a - The "a" complex.com.aspose.ms.System.DivideByZeroException - Can not divide by zero.public static void divide(Complex a, Complex b, Complex[] result)
Divides a by b.
a - The "a" complex.b - The b complex.result - The result.com.aspose.ms.System.DivideByZeroException - Can not divide by zero.public static void divide(Complex a, double s, Complex[] result)
Divides a by s.
a - The "a" complex.s - The s value.result - The result.com.aspose.ms.System.DivideByZeroException - Can not divide by zero.public static void divide(double s,
Complex a,
Complex[] result)
Divides s by a.
s - The s value.a - The "a" complex.result - The result.com.aspose.ms.System.DivideByZeroException - Can not divide by zero.public static Complex negate(Complex a)
Negates a.
a - The "a" complex.public static boolean approxEqual(Complex a, Complex b)
Checks approximate equality.
a - The "a" complex.b - The b complex.public static boolean approxEqual(Complex a, Complex b, double tolerance)
Checks approximate equality.
a - The "a" complex.b - The b complex.tolerance - The tolerance.public static Complex parse(String s)
Parses the specified s into a Complex.
s - The s value.com.aspose.ms.System.FormatException - String representation of the complex number is not correctly formatted.public static boolean tryParse(String s, Complex[] result)
Tries to parse the specified s into a Complex.
s - The s value.result - The result.public static Complex sqrt(Complex a)
Gets square root of a.
a - The "a" complex.public static Complex log(Complex a)
Gets log of a.
a - The "a" complex.a.public static Complex exp(Complex a)
Raises e by a.
a - The "a" complex.a.public static Complex sin(Complex a)
Gets Sin of a.
a - The "a" complex.a.public static Complex cos(Complex a)
Gets Cos of a.
a - The "a" complex.a.public static Complex tan(Complex a)
Gets Tan of a.
a - The "a" complex.a.public Complex multiply_internalize(double s)
Multiplies by s.
s - The s value.public final double getRe()
Gets the real part.
public final void setRe(double value)
Sets the real part.
value - the real part.public final double getIm()
Gets the imaginary part.
public final void setIm(double value)
Sets the imaginary part.
value - the imaginary part.public final Complex set(double re, double im)
Sets the values and returns itself.
re - The Re value.im - The Im value.public final double getMagnitude()
Gets the magnitude.
Value: The magnitude.public final double getPhase()
Gets the phase.
Value: The phase.public final double getSquaredMagnitude()
Gets the squared magnitude.
Value: The squared magnitude.public int hashCode()
Returns a hash code for this instance.
public boolean equals(Object obj)
Determines whether the specified Object, is equal to this instance.
public final Complex deepClone()
Clones this instance.
public void CloneTo(Complex that)
CloneTo in class com.aspose.ms.System.ValueType<Complex>Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.