yellowine wrote:
double Length0(double x1, double y1, double z1, double x2, double y2, double z2) { double dx = x2 - x1; double dy = y2 - y1; double dz = z2 - z1; return (dx*dx + dy*dy + dz*dz); }
You can see no specific improvements with that change there. but on the other hand There would be some improvements with the first case (length0), If the calculations happen inside a loop. just a rough example:
double y1, double z1, double x2, double y2, double z2)
{
double dx = x2 - x1;
double dy = y2 - y1;
double dz = z2 - z1;
double result =0.0;
for(int i=xx;i<yx;i++)>
{
result += (dx* i + dy * i + dz * i);
}
return result;
}
There it would make sense to keep them out of the loop and see some performance improvements.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus