From 7d41c2213b5070d444fa17cdb04eeb9fdc955309 Mon Sep 17 00:00:00 2001 From: Katja Date: Sun, 6 Nov 2011 15:38:24 +0000 Subject: made smlib compliant with double precision svn path=/trunk/externals/smlib/; revision=15707 --- hist.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'hist.c') diff --git a/hist.c b/hist.c index 32bf5b7..fdfaf8f 100644 --- a/hist.c +++ b/hist.c @@ -8,12 +8,12 @@ static t_class *hist_class; typedef struct _hist { t_object x_obj; - float m_lo; - float m_hi; - float m_scale; + t_float m_lo; + t_float m_hi; + t_float m_scale; int m_nbins; int m_n_observations; - float *m_hist; + t_float *m_hist; } t_hist; @@ -41,7 +41,7 @@ static void hist_perform_list(t_hist *x, t_symbol *s, int argc, t_atom *argv) static void hist_bang(t_hist *x) { int i,n; - float *f; + t_float *f; t_atom *ap,*app; n=x->m_nbins; @@ -63,8 +63,8 @@ static void hist_bang(t_hist *x) static void hist_relative(t_hist *x) { int i,n; - float *f; - float invn; + t_float *f; + t_float invn; t_atom *ap,*app; n=x->m_nbins; ap = (t_atom *)getbytes(sizeof(t_atom)*n); @@ -87,7 +87,7 @@ static void hist_relative(t_hist *x) static void hist_clear(t_hist *x) { int i; - float *f; + t_float *f; f=x->m_hist; for (i=0;im_nbins;i++) *f++=0.0f; @@ -114,8 +114,8 @@ static void hist_set(t_hist *x, t_float lo, t_float hi, t_float nbins) x->m_hi=hi; x->m_lo=lo; x->m_nbins=(int)nbins; - x->m_scale=(float)x->m_nbins/(hi-lo); - x->m_hist = (float*)getbytes(sizeof(float)*x->m_nbins); + x->m_scale=(t_float)x->m_nbins/(hi-lo); + x->m_hist = (t_float*)getbytes(sizeof(t_float)*x->m_nbins); hist_clear(x); } -- cgit v1.2.1