C++ Language/Std/CRuntime/Math/ComplexNumbers

From Wikibooks, open books for an open world
< C++ Language‎ | Std‎ | CRuntime‎ | Math
Jump to navigation Jump to search

Standard C++ defines a complex number as std::complex<float> ffVar(3.0F, 4.0F);. Compute its "phase" using std::arg(), compute its "magnitude" using std::abs(), and compute its "complex conjugate" using std::conj().

Additional information about complex number functions (includes interactive examples)