interpolate.h
C header source for Polychorons, 41 lines. Raw file
/*
INTERPOLATION ROUTINES
All take the form
double interpolateWhatever( double x1, double x2, double alpha )
if you change alpha gradually from 0 to 1 the return value will start at x1, and finish at x2
*/
#ifndef __INTERPOLATE_H__
#define __INTERPOLATE_H__
//---- INTERPOLATION FUNCTION TYPE
typedef double (*INTERPOLATION_FUNCTION)( double, double, double );
//---- INTERPOLATION FUNCTIONS
double interpolateLinear ( double x1, double x2, double a );
double interpolateSpringy( double x1, double x2, double a ); // Has a little bounce at the end
#endif