Complex¶
Definition¶
Extends¶
Extended By¶
None
Description¶
A number with a real and imaginary component.
Method Summary¶
Owner | Name | Return Type | Description |
---|---|---|---|
Complex | constructor(real, imaginary) | Complex | Initialize a complex number as a Complex object. Must provide the real and imaginary components. |
Complex | getAbsolute() | Double | Returns the absolute value, or modulus, of this complex number. |
Object | getClassName() | String | Returns the string name of this object's class type. |
Complex | getConjugate() | Complex | Returns the complex conjugate value of the complex number. |
Complex | getCos() | Complex | Returns the cosine of the supplied complex number. |
Complex | getCosh() | Complex | Returns the hyperbolic cosine of the supplied complex number. |
Complex | getExponential() | Complex | Returns e raised to the power of the supplied complex number. |
Complex | getImaginary() | Double | Returns the imaginary (i) component of the complex number. |
Complex | getLogarithm() | Complex | Returns the natural log of the supplied complex value. |
Complex | getNegative() | Complex | Returns the negative value of the supplied complex number. |
Complex | getReal() | Double | Returns the real (non i) component of the complex number. |
Complex | getSin() | Complex | Returns the sine of the supplied complex number. |
Complex | getSinh() | Complex | Returns the hyperbolic sine of the supplied complex number. |
Complex | getSqrt() | Complex | Returns the square root of the supplied complex number. |
Complex | getTan() | Complex | Returns the tangent of the supplied complex number. |
Object | toJson() | String | Returns a string of a json representation of this object. |
Method Definitions¶
constructor(real,imaginary)¶
Complex complex = new Complex(Number real, Number imaginary)
Description¶
Initialize a complex number as a Complex object. Must provide the real and imaginary components.
Parameter Definition¶
Name | Type | Description |
---|---|---|
real | Number | value of real part |
imaginary | Number | value of imaginary part |
Example 1¶
These two statements are equivalent.
getAbsolute()¶
Description¶
Returns the absolute value, or modulus, of this complex number.
Example 1¶
getClassName()¶
Description¶
Returns the string name of this object's class type.
getConjugate()¶
Complex Complex::getConjugate()
Description¶
Returns the complex conjugate value of the complex number.
Example 1¶
getCos()¶
Description¶
Returns the cosine of the supplied complex number.
Example 1¶
getCosh()¶
Description¶
Returns the hyperbolic cosine of the supplied complex number.
Example 1¶
getExponential()¶
Complex Complex::getExponential()
Description¶
Returns e raised to the power of the supplied complex number.
Example 1¶
getImaginary()¶
Double Complex::getImaginary()
Description¶
Returns the imaginary (i) component of the complex number.
Example 1¶
getLogarithm()¶
Complex Complex::getLogarithm()
Description¶
Returns the natural log of the supplied complex value.
Example 1¶
getNegative()¶
Complex Complex::getNegative()
Description¶
Returns the negative value of the supplied complex number.
Example 1¶
getReal()¶
Description¶
Returns the real (non i) component of the complex number.
Example 1¶
getSin()¶
Description¶
Returns the sine of the supplied complex number.
Example 1¶
getSinh()¶
Description¶
Returns the hyperbolic sine of the supplied complex number.
Example 1¶
getSqrt()¶
Description¶
Returns the square root of the supplied complex number.
Example 1¶
getTan()¶
Description¶
Returns the tangent of the supplied complex number.
Example 1¶
toJson()¶
Description¶
Returns a string of a json representation of this object.