muppetds wrote:
*sighs* what was it?
it was in the rectangle intersection code.
it was:
x + width < rect.x || x > rect.x + rect.width || y + height < rect.y || y > rect.x + rect.height
instead of:
x + width < rect.x || x > rect.x + rect.width || y + height < rect.y || y > rect.y + rect.height
look closely.
Offline
Why don't you use the java.awt.Rectangle class?
It would be much easier for you, and the class is much faster implemented, too.
import java.awt.Rectangle; ... int x = 10; int y = 5; int width = 10; int height = 20; Rectangle r = new Rectangle(x, y, width, height); ... System.out.println(r.intersects(new Rectangle(15, 15, 10, 10));
Last edited by ZeroLuck (2012-04-02 15:56:31)
Offline
ZeroLuck wrote:
Why don't you use the java.awt.Rectangle class?
It would be much easier for you, and the class is much faster implemented, too.Code:
import java.awt.Rectangle; ... int x = 10; int y = 5; int width = 10; int height = 20; Rectangle r = new Rectangle(x, y, width, height); ... System.out.println(r.intersects(new Rectangle(15, 15, 10, 10));
Didn't know it existed. Oh well.
Offline
nump hows all goin need anything yet
Offline
yeah i recently heard a quote from someone
"programing is 10% writing codes and 90% debugging it"
Offline
bump so what is the name for this
Offline
muppetds wrote:
slayerrobe7 wrote:
yeah i recently heard a quote from someone
"programing is 10% writing codes and 90% debugging it"PF i think it was
Nope, but it's true.
Offline
bump
Offline
ZeroLuck wrote:
I and TRocket are doing this too. The code is here: http://sourceforge.net/p/jblocks/code-0/
( But don't copy/steal it )
And where can I download an executable? (jar, jnlp, etc)
Offline
bumpity
Offline