Go to the documentation of this file. 14 #ifndef PARTICLECOMMONFUNCS_H 15 #define PARTICLECOMMONFUNCS_H 18 #define NORMALIZED_RAND() ((PN_stdfloat)rand() / (PN_stdfloat)RAND_MAX) 21 #define LERP(t,X0,X1) ((X0) + ((t) * ((X1) - (X0)))) 24 #define CUBIC_T(t) ((t)*(t)*(3-(2*(t)))) 27 #define CLERP(t,X0,X1) LERP(CUBIC_T(t), (X0), (X1)) 31 #define SPREAD(magnitude) ((magnitude) - (NORMALIZED_RAND() * 2.0f * (magnitude))) 35 #define I_SPREAD(magnitude) ((magnitude) - ((int)rand() % ((2*(magnitude))+1))) 37 #endif // PARTICLECOMMONFUNCS_H