-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quil.core.fill & stroke cast single integer arguments to float breaking tests #364
Comments
I've started looking at this, but unfortunately it's a little more complicated than expected. Specifically because in Processing/clj It's also not clear if Finally, if we call I'll try and make a table to summarize all the input modes to expected values, as I think that might help determine the best approach. I think your intuition on checking for int is correct, I just think we have a few more cases to cover for it to handle all the expected inputs in a sane way. |
Partial fix for #364. Forces any of the mulity-arity color functions to preserve integers on gray or gray,alpha argument signatures. This is sufficient to fix 5 tests so it's a good stop gap, but not happy with performance and I still think a table of values and expected would help for this.
I'm running a local build of Quil based on master which uses Processing 4 beta 8. Commit 1f214e7, which is not yet in a released version of Quil, casts the argument of the single argument definition of
fill
andstroke
to a float. Although this commit does make those functions conform to their documentation, it does break the common usage of those functions including in the Quil example snippets and hence tests fail.As an example, the usage pattern below is now broken by the commit as the integer returned by
(color)
gets cast to a float before being passed to the underlying Processing method which interprets a single argument of type float as a gray scale.I suggest the single argument definition of fill and stroke should not cast to a float if the argument is of type integer.
The text was updated successfully, but these errors were encountered: