Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 finding the distance
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Chaos_Theory




PostPosted: Thu Apr 21, 2005 5:42 pm   Post subject: finding the distance

how do you find the distance between to object that randomly appear somewhere on the screen?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Apr 21, 2005 5:45 pm   Post subject: (No subject)

Turing:

Math.Distance(x1,y1,x2,y2)

perhaps?
Chaos_Theory




PostPosted: Thu Apr 21, 2005 5:47 pm   Post subject: (No subject)

Tony wrote:
Turing:

Math.Distance(x1,y1,x2,y2)

perhaps?


I tired that already.. and it says that distance is not a part of math
36002




PostPosted: Thu Apr 21, 2005 6:37 pm   Post subject: (No subject)

You might have an older version of Turing. Try this:
code:

d := ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** .5 %this gets the distance between two points

simple math Very Happy
Chaos_Theory




PostPosted: Thu Apr 21, 2005 8:48 pm   Post subject: (No subject)

36002 wrote:
You might have an older version of Turing. Try this:
code:

d := ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** .5 %this gets the distance between two points

simple math Very Happy


thnx... now my program is pretty much complete...just a lil but of minor tweakig
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: