Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting strange results from Rectangle outcode method

 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following nodeRect.outcode(currentRect.getX(), currentRect.getY());
and I get the value of 3 and 0 and 6

I know
OUT_BOTTOM = 8
OUT_LEFT = 1
OUT_RIGHT = 4
OUT_TOP = 2

but what are the other values?

Thank you for your time
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The return value is the sum of all applicable values. 3 is
1+2, and 6 is 2+4.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic