trying to fix positionPoint()
This commit is contained in:
parent
c58d0e0971
commit
2b39f792a1
|
@ -71,12 +71,12 @@ point State::positionPoint(int i, int j, Settings s)
|
||||||
{
|
{
|
||||||
point ul = s.getUL(), ur = s.getUR(), bl = s.getBL(), br = s.getBR();
|
point ul = s.getUL(), ur = s.getUR(), bl = s.getBL(), br = s.getBR();
|
||||||
point topp, botp, pp;
|
point topp, botp, pp;
|
||||||
topp.x = ul.x + (i*(ur.x-ul.x))/size;
|
topp.x = ul.x + (i*(ur.x-ul.x))/(size-1);
|
||||||
topp.y = ul.y + (i*(ur.y-ul.y))/size;
|
topp.y = ul.y + (i*(ur.y-ul.y))/(size-1);
|
||||||
botp.x = bl.x + (i*(br.x-bl.x))/size;
|
botp.x = bl.x + (i*(br.x-bl.x))/(size-1);
|
||||||
botp.y = bl.y + (i*(br.y-bl.y))/size;
|
botp.y = bl.y + (i*(br.y-bl.y))/(size-1);
|
||||||
pp.x = topp.x + (j*(botp.x-topp.x))/size;
|
pp.x = topp.x + (j*(botp.x-topp.x))/(size-1);
|
||||||
pp.y = topp.y + (j*(botp.y-topp.y))/size;
|
pp.y = topp.y + (j*(botp.y-topp.y))/(size-1);
|
||||||
return pp;
|
return pp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue