I don't know... isn't this how most of the curly bracket languages work? Might as well keep ChucK in line with the other languages. Btw, shouldn't it be the same as this:
[Interval.r(1), Interval.r(1), Interval.r(1), Interval.r(1)]
/Stefan
I find the integer divisions C rule is problematic when working with intervals. Suppose I have [8/7, 7/6, 7/6, 8/7] and implement it as
[Interval.r(8/7), Interval.r(7/6), Interval.r(7/6), Interval.r(8/7)]
Then this is the same as:
[Interval.r(0), Interval.r(0), Interval.r(0), Interval.r(0)]
One has to add ".0" one of the numerator/denominator:
[Interval.r(8.0/7), Interval.r(7.0/6), Interval.r(7.0/6), Interval.r(8.0/7)],
One possible rule might be converting 32-bit int to 64-bit floats, and then only back to int when needed. The question if it then affects some ChucK legacy code.
Hans
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users