you need to use cast say you have a float variable space and you want to convert to integer discrete: space % int => int discrete; hope this helps brian
From: "Laurie Hollander"
Date: 2006/11/03 Fri PM 09:18:25 EST To: chuck-users@lists.cs.princeton.edu Subject: [chuck-users] Float to int Sorry for the low level of this question, but.... I'm trying to convert a floating point number to an int so I can chuck it to the blit harmonics parameter. I've already used the math floor function on it, so it can be converted to an int without losing any information. But I can't chuck it to an int without getting error messages, and I can't find any function that converts a float to an int in mini-Audicle or Chuck. Is there a way to do this?
Thank you!
--laurie _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (1)
-
babiakb@bellsouth.net