Lost Password?   -   Register

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
<
[-]
Welcome
You have to register before you can post on our site.

Username:
  

Password:
  




[-]
Social Pages
Like Us on Facebook
Follow Us on Google+
.Phoenix USC on Google+



Follow Us on Twitter


[-]
Twitter

[-]
Top Poster
no avatar

no posts

[-]
Random Quotes
This is the place for open discussion.
Vidiot_X's profile Vidiot_X
This is the place for open discussion. Non-Phoenix USC. NO Ads or other such nonsense please.

distance function
02-14-2013, 02:29 PM (This post was last modified: 02-14-2013 02:40 PM by Cruis.In.)
Post: #1
distance function
hey Richard this looks fine right?

Function GetDistance(X, Y, DX, DY)

Local distance = Sqr( (X - DX) * (X - DX) + (Y - DY) * (Y - DY) )

Return DISTANCE
End Function

then distance = GetDistance(Car.X, Car.Y, Truck.X, Truck.Y)

daw found it....forgot to declare the variable type. Was getting an error in the numbers after a certain while, wondered first if my formula was right then would have moved on but as i looked i realized my parameters have no type set.

yay
Find all posts by this user
Quote this message in a reply
01-27-2016, 01:53 AM
Post: #2
RE: distance function
BlushBlushBlush




goldenslot
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)
This forum uses Krzysztof "Supryk" Supryczynski addon..: