Closed iandol closed 3 years ago
I commited a fix to my master, doable for this case. Ofc. it now still fails for nrects=4, because of the ambiguity in some functions if a 4x4 matrix is 4 rects in 4 rows, or 4 rects in 4 columns. Ever allowing the level of flexibility in the PsychRects functions we have now, and making them "guess" from the shape of input args what they should do was a bad api design idea.
Indeed I think general flexibility always has a price, as is clear for the edge case of 4x4 inputs. Changing the behaviour to be consistent will break backwards compatibility, so your approach is the only viable one…
If you try to run
ProceduralGarboriumDemo(1)
you get a crash inOffsetRect.m
:ProceduralGarboriumDemo(2)
works (even though it also passes row-indexed rect) and this is due to the following check starting line 30 ofOffsetRect.m
:Other PsychRect functions are quite robust about swapping row/column order, and OffsetRect works fine if the error condition is removed. I'm not sure if you prefer to keep this strict check in place or relax it?