Home
1 application Binary restricted distribution Commercial use allowed Can modify source Read full license | More Info
Price: $ 4.99
Complex numbers are of vital importance in engeneering, physics and math, also many topics on game development , require understanding of complex number field of application. The class is a single .h file The class implements templated overloaded operators, an exaple of usage is as follows:
// declaration
CComplex a(1,2),b(2,4) ,c(3,2),d(1,1),e(2,2);
//Arithmetics :
a=-b;
a=+b;
a= b+c;
a= 10.0f / b ;
a= b / 10.0f ;
b = a * 10.0f;
b+=c ;
b/= c *10.0f;
a = b * c ;
b = c/ b ;
a = b+c +d +e ;
// get real and immaginary part
float r = a.GetReal();
float i= a.GetIm();
// get real and immaginary part in trigonometric form
r= a.GetRealTrigForm();
i=b.GetImTrigForm();
CComplex Coniugate ,Reciprocal;
// coniugate and reciprocals
Coniugate= a.GetConiugate();
Reciprocal = a. GetReciprocal();
// modulus and phase
float m = b.GetModulus();
float ph = c.GetPhase();
Price: $ 4.99
Questions & Comments
Leave a comment
Log-in now or register for a free account.