
#include "konstanten.h"

// Utilities==========================

float sgn(float x)
{
	return x / fabs(x); 	
}

float normalizeAngle(float f)
{
	while (f < -Pi) f += 2 * Pi; 
	while (f >  Pi) f -= 2 * Pi;
	
	return f;
}

float subtractAngles(float f, float fa)
{
	while (f < fa) f += 2 * Pi; 
	f -= fa;
	while (f > Pi) f -= 2 * Pi;
	
	return f;
}






