/* 
 * University of Leipzig: trigonom.h, v0.1b  21.9.97 22:58 
 * 
 * 
 * Copyright 1997 by University of Leipzig
 * 
 * Permission to use, copy, modify, and distribute this software for noncommercial 
 * use and without fee is hereby granted, provided that the above copyright notice 
 * appear in all copies and that both that copyright notice and this permission 
 * notice appear in supporting documentation, and that the name of the U.L. not be 
 * used in advertising or publicity pertaining to distribution of the software 
 * without specific, written prior permission. The U.L. makes no representations about
 * the suitability of this software for any purpose.  It is provided "as is" 
 * without expressed or implied warranty. 
 * 
 * 
 * pantec@aix520.informatik.uni-leipzig.de   (Thomas Pantzer) 
 * 
 */




#ifndef TRIGONOM_H
#define TRIGONOM_H


//#include "floatsize.h"
#include "t_vector.h"


#define RAD(x)          ((double)(x)*M_PI/180)
#define DEG(x)		((double)(x)*180/M_PI)

// typedef struct { double x,y; } t_vector;
// typedef struct { float x,y; } t_vertex_2f;

extern double clip_angle(double w);
extern double RAD_NORM(double a);
extern double DEG_NORM(double a);
extern double angle_difference(double v, double w);
extern double angle_average(double deg, double deg2);

extern void Len2_Polar(int ,int , double *, double *);
extern void L2P(int i, int j, double angle, double &dx, double &dy);
extern void HalfWay(t_vector, t_vector, t_vector *);

extern int random_int(int range);
extern double random_uniform();

extern double Exp(double x, int prec);
extern double gaussian(double x,double width,double acc);
extern double sigmoid(double x,double acc,double shift);


/*  look at the vector unit

extern void rotate(double &x, double &y, double rho);
extern void rotate(float &x, float &y, double rho);
extern void turn_xy(t_vector *,t_vector,double);
extern void norm_vec(t_vector *P);
extern double distance(t_vector,t_vector);
*/
#endif









/**/
/**/
/**/
/**/
/**/
/**/
/**/
/**/
/*****  End Of File  ****************************/
