# JSXGraph Reference

## JavaScript must be enabled in order for you to use JSXGraph and JSXGraph reference. However, it seems JavaScript is either disabled or not supported by your browser.

Class Index | File Index

## Elements

## Classes

- _global_
- Angle
- Arc
- Arrow
- Arrowparallel
- Axis
- Bisector
- Bisectorlines
- Button
- Cardinalspline
- Checkbox
- Circle
- Circumcenter
- Circumcircle
- CircumcircleArc
- CircumcircleSector
- Conic
- Curve
- Derivative
- Ellipse
- Functiongraph
- Glider
- Grid
- Group
- Hatch
- Hyperbola
- Image
- Incenter
- Incircle
- Inequality
- Input
- Integral
- Intersection
- JXG
- JXG.AbstractRenderer
- JXG.Board
- JXG.C
- JXG.CA
- JXG.CanvasRenderer
- JXG.Circle
- JXG.Complex
- JXG.Composition
- JXG.Coords
- JXG.CoordsElement
- JXG.Curve
- JXG.Dump
- JXG.EventEmitter
- JXG.GeometryElement
- JXG.GeonextParser
- JXG.Group
- JXG.Image
- JXG.JessieCode
- JXG.JSXGraph
- JXG.Line
- JXG.Math
- JXG.Math.Geometry
- JXG.Math.Numerics
- JXG.Math.Poly
- JXG.Math.Poly.Monomial
- JXG.Math.Poly.Polynomial
- JXG.Math.Poly.Ring
- JXG.Math.Statistics
- JXG.Math.Symbolic
- JXG.NoRenderer
- JXG.Options
- JXG.Point
- JXG.Polygon
- JXG.Server
- JXG.Server.modules
- JXG.SVGRenderer
- JXG.Text
- JXG.Ticks
- JXG.Transformation
- JXG.Turtle
- JXG.Util
- JXG.Util.Base64
- JXG.Util.Unzip
- JXG.Util.UTF8
- JXG.VMLRenderer
- JXG.XML
- Label
- Line
- Locus
- MajorArc
- MajorSector
- Midpoint
- MinorArc
- MinorSector
- Mirrorelement
- Mirrorpoint
- NonReflexAngle
- Normal
- Orthogonalprojection
- OtherIntersection
- Parabola
- Parallel
- Parallelpoint
- Perpendicular
- PerpendicularPoint
- PerpendicularSegment
- Point
- PolarLine
- PolePoint
- Polygon
- Quadtree
- RadicalAxis
- Reflection
- ReflexAngle
- RegularPolygon
- Riemannsum
- Sector
- Segment
- Semicircle
- Slider
- Slopetriangle
- Spline
- Stepfunction
- Tangent
- Tapemeasure
- Text
- Ticks
- Tracecurve
- Transformation
- Turtle

# Class JXG.Complex

↳ JXG.Complex

This class is for calculating with complex numbers.
Defined in: complex.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| JXG.Complex(x, y) Creates a new complex number.

Field Summary
Field Attributes | Field Name and Description
--- | ---
| absval Absolute value in the polar form of the complex number.
| angle Angle value in the polar form of the complex number.
| imaginary Imaginary part of the complex number.
<private> | isComplex This property is only to signalize that this object is of type JXG.Complex.
| real Real part of the complex number.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| add(c) Add another complex number to this complex number.
| conj() Conjugate a complex number in place.
| div(c) Divide this complex number by the given complex number.
| mult(c) Multiply another complex number to this complex number.
| sub(c) Subtract another complex number from this complex number.
| toString() Converts a complex number into a string.

Class Detail
JXG.Complex(x, y)
Creates a new complex number.

Parameters:
{Number} x Optional, Default: 0
  Real part.
{Number} y Optional, Default: 0
  Imaginary part.

Field Detail
{Number} absval
Absolute value in the polar form of the complex number. Currently unused.

{Number} angle
Angle value in the polar form of the complex number. Currently unused.

{Number} imaginary
Imaginary part of the complex number.

Default Value:
  0

<private> {Boolean} isComplex
This property is only to signalize that this object is of type JXG.Complex. Only used internally to distinguish between normal JavaScript numbers and JXG.Complex numbers.

Default Value:
  true

{Number} real
Real part of the complex number.

Default Value:
  0

Method Detail
{JXG.Complex} add(c)
Add another complex number to this complex number.

Parameters:
{JXG.Complex|Number} c
  A JavaScript number or a JXG.Complex object to be added to the current object.

Returns:
  {JXG.Complex} Reference to this complex number

{JXG.Complex} conj()
Conjugate a complex number in place.

Returns:
  {JXG.Complex} Reference to this complex number

{JXG.Complex} div(c)
Divide this complex number by the given complex number.

Parameters:
{JXG.Complex|Number} c
  A JavaScript number or a JXG.Complex object to divide the current object by.

Returns:
  {JXG.Complex} Reference to this complex number

{JXG.Complex} mult(c)
Multiply another complex number to this complex number.

Parameters:
{JXG.Complex|Number} c
  A JavaScript number or a JXG.Complex object to multiply with the current object.

Returns:
  {JXG.Complex} Reference to this complex number

{JXG.Complex} sub(c)
Subtract another complex number from this complex number.

Parameters:
{JXG.Complex|Number} c
  A JavaScript number or a JXG.Complex object to subtract from the current object.

Returns:
  {JXG.Complex} Reference to this complex number

{String} toString()
Converts a complex number into a string.

Returns:
  {String} Formatted string containing the complex number in human readable form (algebraic form).