documentation of whereIsThePoint

Create fast, sprite powered games with Animation Engine, co-developed with DerBrill Software!

Moderators: heatherlaine, robinmiller, kevinmiller, malte

Post Reply

Good idea?

No votes
More Beer!
Total votes: 4

VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich

documentation of whereIsThePoint

Post by BvG » Sun May 21, 2006 3:57 pm

I think the dictionary entry for whereIsThePoint() should be similar to this (additions in red):


get whereIsThePoint(100,200,50,300,80,100)
get whereIsThePoint(line 1 of the points of grc 1,line 2 of the points of grc 1,the loc of btn "myButton")

This function returns:
"left" when the point (x3,y3) is left of the line (x1,y1,x2,y2)
"right" when the point (x3,y3) is right of the line (x1,y1,x2,y2)
"on" when the point (x3,y3) is on the line (x1,y1,x2,y2)

Attention! The sorting of the points is important. The first 2 parameters represent the point you look at, the second 2 parameters the point where you stand. If you reorder the paramters you pass for the same constellation of points you get the inverse result."
Various teststacks and stuff:

Chat with other RunRev developers: #livecode

Post Reply

Return to “Animation Engine”