Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programming challenge, gravity
Message
De
30/06/2004 19:22:12
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
24/06/2004 12:14:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00916106
Message ID:
00919431
Vues:
29
Hi Mike

I drew a triangle and relearned the process.

Given a and b ...

c = m.a / COS(ATAN(m.b/m.a))


>>Pretty interesting stuff. I think there's another way to do these calcs. Using Sin/Cos you can determine the x and y. You can build a table of sin/cos values in an array and get the value based on the angle between the two objects. This is supposed to be much faster than SQRT.
>
>Do you suppose you could post an alternate algorythm that we could compare?
>
>I used the Pythagorean theorem just because it was the simplest, my trig is sooooo rusty. :-)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform