/* cplx.h v 2.0; Michal Szabados */
// Pouzivam suradnice zariadeni - y stupa dodola; doprava je (-y, x)

#ifndef CPLX_H_056562683633673658
#define CPLX_H_056562683633673658

#include <complex>
using namespace std;

typedef complex<double> CD;

#define PI 3.14159265

#define left(x) CD(x.imag(), -x.real())
#define right(x) CD(-x.imag(), x.real())

inline CD rot(CD x, int i)
{
	switch (i)
	{
	case 0:
		return x;
	case 1:
		return right(x);
	case 2:
		return -x;
	case 3:
		return left(x);
	}

	return CD(0, 0);
}

#endif