[chuck-users] Float to int
babiakb at bellsouth.net
babiakb at bellsouth.net
Fri Nov 3 22:00:33 EST 2006
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" <catbird451 at gmail.com>
> Date: 2006/11/03 Fri PM 09:18:25 EST
> To: chuck-users at 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 at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
More information about the chuck-users
mailing list