//#include "fixed_point.h"
//
//#include <stdio.h>
//
//#define printf(...)
//
//#define ADDFB(typeB, name) \
//fixed_point operator+(fixed_point a, typeB b)\
//{\
//	printf("operator+(fixed_point a, %s b)\n", name);\
//	return fixed_point(a.value + b);\
//}
//
//#define ADDAF(typeA, name) \
//fixed_point operator+(typeA a, fixed_point b)\
//{\
//	printf("operator+(%s a, fixed_point b)\n", name);\
//	return fixed_point(a + b.value);\
//}
//
//#define SUBFB(typeB, name) \
//fixed_point operator-(fixed_point a, typeB b)\
//{\
//	printf("operator-(fixed_point a, %s b)\n", name);\
//	return fixed_point(a.value - b);\
//}
//
//#define SUBAF(typeA, name) \
//fixed_point operator-(typeA a, fixed_point b)\
//{\
//	printf("operator-(%s a, fixed_point b)\n", name);\
//	return fixed_point(a - b.value);\
//}
//
//#define MULFB(typeB, name) \
//fixed_point operator*(fixed_point a, typeB b)\
//{\
//	printf("operator*(fixed_point a, %s b)\n", name);\
//	return fixed_point(a.value * b);\
//}
//
//#define MULAF(typeA, name) \
//fixed_point operator*(typeA a, fixed_point b)\
//{\
//	printf("operator*(%s a, fixed_point b)\n", name);\
//	return fixed_point(a * b.value);\
//}
//
//#define DIVFB(typeB, name) \
//fixed_point operator/(fixed_point a, typeB b)\
//{\
//	printf("operator/(fixed_point a, %s b)\n", name);\
//	return fixed_point(a.value / b);\
//}
//
//#define DIVAF(typeA, name) \
//fixed_point operator/(typeA a, fixed_point b)\
//{\
//	printf("operator/(%s a, fixed_point b)\n", name);\
//	return fixed_point(a / b.value);\
//}
//
//#define LTAF(typeA, name) \
//bool operator<(typeA a, fixed_point b)\
//{\
//	printf("operator<(fixed_point a, %s b)\n", name);\
//	return a < b.value;\
//}
//
//#define LTFB(typeB, name) \
//bool operator<(fixed_point a, typeB b)\
//{\
//	printf("operator<(%s a, fixed_point b)\n", name);\
//	return a.value < b;\
//}
//
//#define GTAF(typeA, name) \
//bool operator>(typeA a, fixed_point b)\
//{\
//	printf("operator>(fixed_point a, %s b)\n", name);\
//	return a > b.value;\
//}
//
//#define GTFB(typeB, name) \
//bool operator>(fixed_point a, typeB b)\
//{\
//	printf("operator>(%s a, fixed_point b)\n", name);\
//	return a.value > b;\
//}
//
//#define LTEAF(typeA, name) \
//bool operator<=(typeA a, fixed_point b)\
//{\
//	printf("operator<=(fixed_point a, %s b)\n", name);\
//	return a <= b.value;\
//}
//
//#define LTEFB(typeB, name) \
//bool operator<=(fixed_point a, typeB b)\
//{\
//	printf("operator<=(%s a, fixed_point b)\n", name);\
//	return a.value <= b;\
//}
//
//#define GTEAF(typeA, name) \
//bool operator>=(typeA a, fixed_point b)\
//{\
//	printf("operator>=(fixed_point a, %s b)\n", name);\
//	return a >= b.value;\
//}
//
//#define GTEFB(typeB, name) \
//bool operator>=(fixed_point a, typeB b)\
//{\
//	printf("operator>=(%s a, fixed_point b)\n", name);\
//	return a.value >= b;\
//}
//
//#define EQAF(typeA, name) \
//bool operator==(typeA a, fixed_point b)\
//{\
//	printf("operator==(fixed_point a, %s b)\n", name);\
//	return a == b.value;\
//}
//
//#define EQFB(typeB, name) \
//bool operator==(fixed_point a, typeB b)\
//{\
//	printf("operator==(%s a, fixed_point b)\n", name);\
//	return a.value == b;\
//}
//
//ADDAF(float, "float")
//ADDFB(float, "float")
//ADDAF(int, "int")
//ADDFB(int, "int")
//
//SUBAF(float, "float")
//SUBFB(float, "float")
//SUBAF(int, "int")
//SUBFB(int, "int")
//
//MULAF(float, "float")
//MULFB(float, "float")
//MULAF(int, "int")
//MULFB(int, "int")
//
//DIVAF(float, "float")
//DIVFB(float, "float")
//DIVAF(int, "int")
//DIVFB(int, "int")
//
//LTAF(float, "float")
//LTFB(float, "float")
//LTAF(int, "int")
//LTFB(int, "int")
//
//GTAF(float, "float")
//GTFB(float, "float")
//GTAF(int, "int")
//GTFB(int, "int")
//
//LTEAF(float, "float")
//LTEFB(float, "float")
//LTEAF(int, "int")
//LTEFB(int, "int")
//
//GTEAF(float, "float")
//GTEFB(float, "float")
//GTEAF(int, "int")
//GTEFB(int, "int")
//
//EQAF(float, "float")
//EQFB(float, "float")
//EQAF(int, "int")
//EQFB(int, "int")
//
//fixed_point::fixed_point(void)
//{
//	printf("fixed_point(void)\n");
//	value = 0;
//}
//
//fixed_point::fixed_point(fixed_point const &a)
//{
//	printf("fixed_point(fixed_point const &a)\n");
//	value = a.value;
//}
//
//fixed_point::fixed_point(int a)
//{
//	printf("fixed_point(int a)\n");
//	value = (float)a;
//}
//
//fixed_point::fixed_point(float a)
//{
//	printf("fixed_point(float a)\n");
//	value = a;
//}
//
//fixed_point::fixed_point(double a)
//{
//	printf("fixed_point(double a)\n");
//	value = a;
//}
//
//fixed_point::operator int()
//{
//	printf("operator int()\n");
//	return (int)value;
//}
//
//fixed_point::operator float()
//{
//	printf("operator float()\n");
//	return value;
//}
//
//fixed_point operator+(fixed_point a, fixed_point b)
//{
//	printf("operator+(fixed_point a, fixed_point b)\n");
//	return fixed_point(a.value + b.value);
//}
//
//fixed_point operator-(fixed_point a, fixed_point b)
//{
//	printf("operator-(fixed_point a, fixed_point b)\n");
//	return fixed_point(a.value - b.value);
//}
//
//fixed_point operator*(fixed_point a, fixed_point b)
//{
//	printf("operator*(fixed_point a, fixed_point b)\n");
//	return fixed_point(a.value * b.value);
//}
//
//fixed_point operator/(fixed_point a, fixed_point b)
//{
//	printf("operator/(fixed_point a, fixed_point b)\n");
//	return fixed_point(a.value / b.value);
//}
//
//bool operator!(fixed_point a)
//{
//	printf("operator!(fixed_point a)\n");
//	return !a.value;
//}
//
//fixed_point operator-(fixed_point a)
//{
//	printf("operator-(fixed_point a)\n");
//	return -a.value;
//}
//
//


#include "fixed_point.h"

#include <stdio.h>

//#define ADDFB(typeB, name) \
//fixed_point operator+(fixed_point a, typeB b)\
//{\
//	return fixed_point(a.value + b);\
//}
//
//#define ADDAF(typeA, name) \
//fixed_point operator+(typeA a, fixed_point b)\
//{\
//	return fixed_point(a + b.value);\
//}
//
//#define SUBFB(typeB, name) \
//fixed_point operator-(fixed_point a, typeB b)\
//{\
//	return fixed_point(a.value - b);\
//}
//
//#define SUBAF(typeA, name) \
//fixed_point operator-(typeA a, fixed_point b)\
//{\
//	return fixed_point(a - b.value);\
//}
//
//#define MULFB(typeB, name) \
//fixed_point operator*(fixed_point a, typeB b)\
//{\
//	return fixed_point(a.value * b);\
//}
//
//#define MULAF(typeA, name) \
//fixed_point operator*(typeA a, fixed_point b)\
//{\
//	return fixed_point(a * b.value);\
//}
//
//#define DIVFB(typeB, name) \
//fixed_point operator/(fixed_point a, typeB b)\
//{\
//	return fixed_point(a.value / b);\
//}
//
//#define DIVAF(typeA, name) \
//fixed_point operator/(typeA a, fixed_point b)\
//{\
//	return fixed_point(a / b.value);\
//}
//
//#define LTAF(typeA, name) \
//bool operator<(typeA a, fixed_point b)\
//{\
//	return a < b.value;\
//}
//
//#define LTFB(typeB, name) \
//bool operator<(fixed_point a, typeB b)\
//{\
//	return a.value < b;\
//}
//
//#define GTAF(typeA, name) \
//bool operator>(typeA a, fixed_point b)\
//{\
//	return a > b.value;\
//}
//
//#define GTFB(typeB, name) \
//bool operator>(fixed_point a, typeB b)\
//{\
//	return a.value > b;\
//}
//
//#define LTEAF(typeA, name) \
//bool operator<=(typeA a, fixed_point b)\
//{\
//	return a <= b.value;\
//}
//
//#define LTEFB(typeB, name) \
//bool operator<=(fixed_point a, typeB b)\
//{\
//	return a.value <= b;\
//}
//
//#define GTEAF(typeA, name) \
//bool operator>=(typeA a, fixed_point b)\
//{\
//	return a >= b.value;\
//}
//
//#define GTEFB(typeB, name) \
//bool operator>=(fixed_point a, typeB b)\
//{\
//	return a.value >= b;\
//}
//
//#define EQAF(typeA, name) \
//bool operator==(typeA a, fixed_point b)\
//{\
//	return a == b.value;\
//}
//
//#define EQFB(typeB, name) \
//bool operator==(fixed_point a, typeB b)\
//{\
//	return a.value == b;\
//}

//ADDAF(float, "float")
//ADDFB(float, "float")
//ADDAF(int, "int")
//ADDFB(int, "int")

//SUBAF(float, "float")
//SUBFB(float, "float")
//SUBAF(int, "int")
//SUBFB(int, "int")

//MULAF(float, "float")
//MULFB(float, "float")
//MULAF(int, "int")
//MULFB(int, "int")

//DIVAF(float, "float")
//DIVFB(float, "float")
//DIVAF(int, "int")
//DIVFB(int, "int")

//LTAF(float, "float")
//LTFB(float, "float")
//LTAF(int, "int")
//LTFB(int, "int")
//
//GTAF(float, "float")
//GTFB(float, "float")
//GTAF(int, "int")
//GTFB(int, "int")
//
//LTEAF(float, "float")
//LTEFB(float, "float")
//LTEAF(int, "int")
//LTEFB(int, "int")
//
//GTEAF(float, "float")
//GTEFB(float, "float")
//GTEAF(int, "int")
//GTEFB(int, "int")
//
//EQAF(float, "float")
//EQFB(float, "float")
//EQAF(int, "int")
//EQFB(int, "int")


//fixed_point::fixed_point(void)
//{
//	value = 0;
//}

//fixed_point::fixed_point(fixed_point const &a)
//{
//	value = a.value;
//}

//fixed_point::fixed_point(int a)
//{
//	printf("fixed_point(int a)\n");
////	value = a << 16;
//	value = a;
//}

//fixed_point::fixed_point(float a)
//{
////	value = a * 65536;
//	value = a;
//}

//fixed_point::fixed_point(double a)
//{
//	printf("fixed_point(double a)\n");
////	value = a * 65536;
//	value = a;
//}

//fixed_point::operator int()
//{
//	printf("operator int()\n");
////	return value >> 16;
//	return value;
//}

//fixed_point::operator float()
//{
////	return (float)value / 65536;
//	return value;
//}

//fixed_point operator+(fixed_point a, fixed_point b)
//{
//	fixed_point temp;
//	temp.value = a.value + b.value;
//	return temp;
//}

//fixed_point operator-(fixed_point a, fixed_point b)
//{
//	printf("operator-(fixed_point a, fixed_point b)\n");
//	fixed_point temp;
//	temp.value = a.value - b.value;
//	return temp;
//}

//fixed_point operator*(fixed_point a, fixed_point b)
//{
//	fixed_point temp;
////	temp.value = (a.value * b.value) >> 16;
//	temp.value = a.value * b.value;
//	return temp;
//}

//fixed_point operator/(fixed_point a, fixed_point b)
//{
//	printf("operator/(fixed_point a, fixed_point b)\n");
//	return fixed_point((float)a / (float)b);
//}

//bool operator!(fixed_point a)
//{
//	printf("operator!(fixed_point a)\n");
//	return !a.value;
//}
//
//fixed_point operator-(fixed_point a)
//{
//	printf("operator-(fixed_point a)\n");
//	return -a.value;
//}


