From 4f1ee28d687d583601d41ff58e1618b381d2675f Mon Sep 17 00:00:00 2001 From: Katja Date: Sun, 6 Nov 2011 14:41:44 +0000 Subject: made creb compliant with double precision - changed float to t_float - adapted subnormal detection svn path=/trunk/externals/creb/; revision=15706 --- modules/scrollgrid1D~.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'modules/scrollgrid1D~.c') diff --git a/modules/scrollgrid1D~.c b/modules/scrollgrid1D~.c index d59a101..b7e9aa2 100644 --- a/modules/scrollgrid1D~.c +++ b/modules/scrollgrid1D~.c @@ -55,17 +55,17 @@ typedef struct scrollgrid1D } t_scrollgrid1D; -static inline float _fixedpoint(float x, int n) +static inline t_float _fixedpoint(t_float x, int n) { - int ix = (x + 0.5f); + int ix = (x + 0.5); if (ix < 0) ix = 0; else if (ix >= n) ix = n-1; - return (float)ix; + return (t_float)ix; } -static inline float _sat(float x, float upper) +static inline t_float _sat(t_float x, t_float upper) { - float lower = -1.0f; + t_float lower = -1.0; if (x < lower) x = lower; else if (x > upper) x = upper; return x; @@ -86,7 +86,7 @@ static t_int *scrollgrid1D_perform(t_int *w) t_int n = (t_int)(w[2]); t_int i; - t_float inv_sr = 1.0f /sys_getsr(); + t_float inv_sr = 1.0 /sys_getsr(); t_float state[3] = {ctl->c_x, ctl->c_y, ctl->c_z}; t_float c,f; t_float pole[2], r1, r2; @@ -97,24 +97,24 @@ static t_int *scrollgrid1D_perform(t_int *w) for (i=0; i