# Namespace JXG.C

↳ JXG.C

Namespace for the complex number arithmetic functions.

Defined in: complex.js.

Namespace Summary
Constructor Attributes Constructor Name and Description

JXG.C is the complex number (name)space.
Method Summary
Method Attributes Method Name and Description
<static>
JXG.C.abs(z1)
Absolute value of a complex number.
<static>
Add two (complex) numbers z1 and z2 and return the result as a (complex) number.
<static>
JXG.C.conj(z1)
Conjugate a complex number and return the result.
<static>
JXG.C.div(z1, z2)
Divide two (complex) numbers z1 and z2 and return the result as a (complex) number.
<static>
JXG.C.mult(z1, z2)
Multiply two (complex) numbers z1 and z2 and return the result as a (complex) number.
<static>
JXG.C.sub(z1, z2)
Subtract two (complex) numbers z1 and z2 and return the result as a (complex) number.
Namespace Detail
JXG.C
JXG.C is the complex number (name)space. It provides functions to calculate with complex numbers (defined in JXG.Complex). With this namespace you don't have to modify your existing complex numbers, e.g. to add two complex numbers:
```   var z1 = new JXG.Complex(1, 0);
var z2 = new JXG.Complex(0, 1);
z1 and z2 here remain unmodified. With the object oriented approach above this section the code would look like:
```   var z1 = new JXG.Complex(1, 0);
var z2 = new JXG.Complex(0, 1);
var z = new JXG.Complex(z1);
Method Detail
<static> {Number} JXG.C.abs(z1)
Absolute value of a complex number.
Parameters:
{JXG.Complex|Number} z1
Complex number
Returns:
{Number} real number equal to the absolute value of the given parameter.

Add two (complex) numbers z1 and z2 and return the result as a (complex) number.
Parameters:
{JXG.Complex|Number} z1
Summand
{JXG.Complex|Number} z2
Summand
Returns:
A complex number equal to the sum of the given parameters.

<static> JXG.C.conj(z1)
Conjugate a complex number and return the result.
Parameters:
{JXG.Complex|Number} z1
Complex number
Returns:
A complex number equal to the conjugate of the given parameter.

<static> JXG.C.div(z1, z2)
Divide two (complex) numbers z1 and z2 and return the result as a (complex) number.
Parameters:
{JXG.Complex|Number} z1
Dividend
{JXG.Complex|Number} z2
Divisor
Returns:
A complex number equal to the quotient of the given parameters.

<static> JXG.C.mult(z1, z2)
Multiply two (complex) numbers z1 and z2 and return the result as a (complex) number.
Parameters:
{JXG.Complex|Number} z1
Factor
{JXG.Complex|Number} z2
Factor
Returns:
A complex number equal to the product of the given parameters.

<static> JXG.C.sub(z1, z2)
Subtract two (complex) numbers z1 and z2 and return the result as a (complex) number.
Parameters:
{JXG.Complex|Number} z1
Minuend
{JXG.Complex|Number} z2
Subtrahend
Returns:
A complex number equal to the difference of the given parameters.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Sep 20 2021 11:18:20 GMT+0200 (Mitteleuropäische Sommerzeit)