1
0
Fork 0

Tweaks from Durk.

This commit is contained in:
curt 1999-09-10 17:00:55 +00:00
parent f9c9e8b49f
commit 045b1acef6

View file

@ -52,8 +52,8 @@ double Vector::VecLen()
double length = 0;
for (int i= 0; i < nrData; i++)
length += powl(data[i],2);
return sqrtl(length);
length += pow(data[i],2);
return sqrt(length);
}
@ -89,10 +89,12 @@ Vector VecCross(Vector first, Vector second)
exit(1);
}
#endif
double x = first.data[1] * second.data[2] - first.data[2]*second.data[1];
double y = first.data[2] * second.data[0] - first.data[0]*second.data[2];
double z = first.data[0] * second.data[1] - first.data[1]*second.data[0];
return Vector(x,y,z);
Vector result(x,y,z);
return result;
}