This site requires JavaScript, please enable it in your browser!
Greenfoot back
aang.18
aang.18 wrote ...

2015/12/4

What does int xOff and int yOff do?

aang.18 aang.18

2015/12/4

#
As the title says I'm just curious about what that code does exactly.
Super_Hippo Super_Hippo

2015/12/4

#
There are just names for 'int' variables. It doesn't do anything alone.
danpost danpost

2015/12/4

#
'xOff' and 'yOff' are variable that hold int values. The names are just unique character sequences that could be just as well be 'qwer' and 'asdf'. It is wise to give variables names that indicate what its value represents. With 'xOff' and 'yOff', the names indicate the distances between two locations, horizontally and vertically. The names do not indicate what locations might be involved, however.
aang.18 aang.18

2015/12/4

#
So if xOff=0 and yOff=0 what would it's location be?
Super_Hippo Super_Hippo

2015/12/4

#
Both locations would be at the same position.
You need to login to post a reply.