Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

Complex

 

Using U++ complex number class (derived from std::complex)

 

 

Complex.cpp

 

#include <Core/Core.h>

 

using namespace Upp;

 

CONSOLE_APP_MAIN

{

    StdLogSetup(LOG_COUT|LOG_FILE);

 

    Complex a(3, 4);

    

    DUMP(a);

    DUMP(a.imag());

    DUMP(a.real());

    DUMP(abs(a));

    DUMP(a + a);

    DUMP(2.0 + a);

    DUMP(2.0 * a);

    DUMP(a * a);

}

 

 

 

 

Do you want to contribute?