From 562dcc336797951b2a8707413aa44177484c9f2a Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Sat, 28 Dec 2002 04:37:42 +0000 Subject: "" svn path=/trunk/; revision=309 --- externals/grill/flext/source/flsupport.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'externals/grill/flext/source/flsupport.cpp') diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp index 85ebae79..cd57dfd8 100644 --- a/externals/grill/flext/source/flsupport.cpp +++ b/externals/grill/flext/source/flsupport.cpp @@ -58,3 +58,21 @@ void flext::GetAString(const t_atom &a,char *buf,int szbuf) else if(IsInt(a)) sprintf(buf,"%i",GetInt(a)); #endif } + +int flext::FoldBits(unsigned long h,int bits) +{ + if(!bits) return 0; + const int hmax = (1<>i)&hmax); + return ret; +} + +int flext::Int2Bits(unsigned long n) +{ + int b; + for(b = 0; n; ++b) n >>= 1; + return b; +} + -- cgit v1.2.1