Class Complex
Defined in: complex1.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Complex(real, imaginary)
The first step in defining a class is defining the constructor
function of the class.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
Complex.add(a, b)
|
<static> |
Complex.multiply(a, b)
|
negative()
|
|
<static> |
Complex.subtract(a, b)
|
toString()
|
|
valueOf()
|
Class Detail
Complex(real, imaginary)
The first step in defining a class is defining the constructor
function of the class. This constructor should initialize any
instance properties of the object. These are the essential
"state variables" that make each instance of the class different.
- Parameters:
- real
- imaginary
Method Detail
<static>
Complex.add(a, b)
- Parameters:
- a
- b
magnitude()
<static>
Complex.multiply(a, b)
- Parameters:
- a
- b
negative()
<static>
Complex.subtract(a, b)
- Parameters:
- a
- b
toString()
valueOf()