Complex number wrapper class.

Namespace:  AForge.Math
Assembly:  AForge.Math (in AForge.Math.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public struct Complex : ICloneable, ISerializable

Remarks

The class encapsulates complex number and provides set of different operators to manipulate it, lake adding, subtractio, multiplication, etc.

Sample usage:

CopyC#
// define two complex numbers
Complex c1 = new Complex( 3, 9 );
Complex c2 = new Complex( 8, 3 );
// sum
Complex s1 = Complex.Add( c1, c2 );
Complex s2 = c1 + c2;
Complex s3 = c1 + 5;
// difference
Complex d1 = Complex.Subtract( c1, c2 );
Complex d2 = c1 - c2;
Complex d3 = c1 - 2;

See Also