~ubuntu-branches/ubuntu/trusty/psychtoolbox-3/trusty-proposed

« back to all changes in this revision

Viewing changes to Psychtoolbox/PsychRects/ArrangeRects.m

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2013-11-19 23:34:50 UTC
  • mfrom: (3.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20131119233450-f7nf92vb8qavjmk8
Tags: 3.0.11.20131017.dfsg1-3
Upload to unsable since fresh glew has arrived to sid!

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
if nargin<3 || nargin>4 
38
38
    error('Usage: cellRects=ArrangeRects(n,objectRect,windowRect,[rightToLeft]);'); 
39
39
end
40
 
if size(objectRect,2)~=4 | size(windowRect,2)~=4
 
40
if size(objectRect,2)~=4 || size(windowRect,2)~=4
41
41
        error('Wrong size rect argument. Usage: cellRects=ArrangeRects(n,objectRect,windowRect,[rightToLeft]);'); 
42
42
end
43
43
if nargin<4
69
69
                cellRect=SetRect(0,0,cellWidth,cellHeight);
70
70
                cellRect=OffsetRect(cellRect,windowRect(RectLeft),windowRect(RectTop));
71
71
                cellRect=OffsetRect(cellRect,(x-1)*cellWidth,(y-1)*cellHeight);
72
 
                if(y<ny | ( x-1>=floor(empties/2) & nx-x>=ceil(empties/2) ) )
 
72
                if(y<ny || ( x-1>=floor(empties/2) && nx-x>=ceil(empties/2) ) )
73
73
                        cellRects(i,:)=cellRect;
74
74
                        i=i+1;
75
75
                        if(i>n)break;end;