aboutsummaryrefslogtreecommitdiff
path: root/msd3D
diff options
context:
space:
mode:
authorN.N. <nimon@users.sourceforge.net>2005-04-22 09:33:32 +0000
committerN.N. <nimon@users.sourceforge.net>2005-04-22 09:33:32 +0000
commita9b231fe0aa28b9c4081edbc75f5a46fcff0cfe5 (patch)
tree7d87f9645706867d8c4ac64791d2196b37464ccc /msd3D
parent81d760d4bc6e1284f9bb874dcec75071b8c96b89 (diff)
MSD Version 0.03
svn path=/trunk/externals/nusmuk/; revision=2802
Diffstat (limited to 'msd3D')
-rwxr-xr-xmsd3D/main.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/msd3D/main.cpp b/msd3D/main.cpp
index 9d0c884..2deb80a 100755
--- a/msd3D/main.cpp
+++ b/msd3D/main.cpp
@@ -482,10 +482,9 @@ protected:
link[nb_link]->D1 = GetFloat(argv[4]); // D1
link[nb_link]->D2 = GetFloat(argv[5]); // D2
link[nb_link]->longx = link[nb_link]->mass1->posX - link[nb_link]->mass2->posX; // Lx[0]
- if (link[nb_link]->longx < 0)
- link[nb_link]->longueur = -link[nb_link]->longx;
- else
- link[nb_link]->longueur = link[nb_link]->longx ;// L[0]
+ link[nb_link]->longy = link[nb_link]->mass1->posY - link[nb_link]->mass2->posY; // Ly[0]
+ link[nb_link]->longz = link[nb_link]->mass1->posZ - link[nb_link]->mass2->posZ; // Lz[0]
+ link[nb_link]->longueur = sqrt(pow(link[nb_link]->longx,2)+pow(link[nb_link]->longy,2)+pow(link[nb_link]->longz,2));//L[0]
link[nb_link]->nbr = id_link; // id number
link[nb_link]->distance_old = link[nb_link]->longueur; // L[n-1]
switch (argc) {