intersect function

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
vtrbojevic
Posts: 14
Joined: Mon Dec 21, 2009 10:37 pm

intersect function

Post by vtrbojevic » Mon Mar 08, 2010 10:45 pm

Hi Forum,

I was using the "intersect(object1, object2)" function where one object was a circle (oval) and the other rectangle. I have noticed that it flags intersection when the rectangle corner is not in the circle but in the square which bounds the circle. It seems that the only way out is to use "within" to check each corner of the rectangle. Is there any better way of doing this.

Regards,

Vladimir

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: intersect function

Post by Mark » Sat Mar 13, 2010 1:23 am

Hi Vladimir,

Nope, I can't think of a better way of doing this. I had the same problem recently. If you have found a better way yourself, meanwhile, I'd be very interested.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply