2010/8/24 Tambet <qtvali@gmail.com>
http://wiki.cs.princeton.edu/index.php/ChucK/Features/Release - the most prioritized feat for next release is extending maybe.

Well....... it's on the top of that list. The list *should* be prioritised but I don't think it is.

How about this;

fun int chance(float arg)
    {
    if (Std.rand2f(0, 1) > arg) return 1;
    else return 0;
    }

You could add that to a public class called "mylib" and from there on it would be available in all your code, just like any other utility functions you might like to add.

Hope that helps,
Kas.