Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
hagen
Posts: 100
Registered: ‎04-07-2009
My Device: Not Specified
Accepted Solution

VecMath.intersects() returns false, but line segments do cross

VecMath.intersects(309, 262, 311, 269, 314, 266, 295, 266);

 

returns false. Why?

 

thx

Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: VecMath.intersects() returns false, but line segments do cross

I just wrote a quick function that did the math and it returned true so you might want to put it in Issue Tracker so it gets resolved.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
hagen
Posts: 100
Registered: ‎04-07-2009
My Device: Not Specified

Re: VecMath.intersects() returns false, but line segments do cross

Thx.

 

I found a workaround meanwhile, I assume

 

VecMath.intersects(ax0, ay0, ax1, ay1, bx0, by0, bx1, by1) ||
VecMath.intersects(bx0, by0, bx1, by1, ax0, ay0, ax1, ay1);

will do the job.