haraldhv
/
aigo
Archived
1
0
Fork 0

trying to fix positionPoint()

This commit is contained in:
Øystein Ingmar Skartsæterhagen 2007-02-25 17:54:55 +00:00
parent c58d0e0971
commit 2b39f792a1
1 changed files with 6 additions and 6 deletions

View File

@ -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;
} }