maxon::Complex is a MAXON API ALIASES class used to represent complex numbers and deliver standard mathematical operations. A complex number is a number that can be expressed in the form a + bi, where a and b are real numbers, and i is a solution of the equation x^2 = -1, which is called an imaginary number because there is no real number that satisfies this equation. For the complex number a + bi, a is called the real part, and b is called the imaginary part. Usually complex numbers are represented in a 2D plane known as "complex plane" or "Argand plane" with the abscissa representing the real part and the ordinate representing the imaginary part.
A maxon::Complex instance can be created on the stack and initialized through the proper method using a numerical data type as template:
The maxon::Complex class delivers a set of standard mathematical operators to perform calculation with complex numbers. The operators delivered are:
The maxon::Complex class is provided with a number of get methods to retrieve useful data from a maxon::Complex instance:
The maxon::Complex class is provided with a number of "set" methods to define a maxon::Complex instance:
A maxon::Complex instance can be converted to maxon::String using:
A maxon::Complex instance can be read from and written to disk by serializing the data contained using the conventional functions.