[chuck-users] Are array types really classes ?
Michael Heuer
heuermh at gmail.com
Thu Sep 3 12:22:16 EDT 2009
Andrew C. Smith wrote:
> I'm not really sure where to start making a dent in your LiCK classes.
> What do the classes do exactly, and do you have any examples of LiCK
> in use? I'm seeing lots of classes like Atan that just take
> Math.atan(x), and I'm wondering how that helps. Also, I'm assuming it
> takes 1.2.2 since it uses array operators like << and .size and all
> (that's the connection to our current thread).
The wiki helps a tiny bit
http://wiki.github.com/heuermh/lick
The unit tests show what the major classes do, e.g.
http://github.com/heuermh/lick/blob/b30c8ab28abe6e1580e43819fe586af247cfd298/ArrayListTest.ck
All the Atan, etc. functions are a workaround for ChucK's lack of
function pointers. For a float list
FloatArrayList list;
list.add(Math.PI); or Math.PI => list.add;
Atan atan;
list.transform(atan);
<<<list.get(0)>>>;
1.262627 :(float)
LiCK works for me on the current 1.2.1.2 version of ChucK.
michael
More information about the chuck-users
mailing list