1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Replace pow() with multiplikation to improve speed

This commit is contained in:
PilzAdam 2012-11-02 16:24:57 +01:00
parent 7fcf153ada
commit b701f8a878
2 changed files with 2 additions and 2 deletions

View file

@ -37,7 +37,7 @@ double dotProduct(double vx, double vy, double wx, double wy){
}
double easeCurve(double t){
return 6*pow(t,5)-15*pow(t,4)+10*pow(t,3);
return t * t * t * (6. * t * t - 15. * t + 10.);
}
double linearInterpolation(double x0, double x1, double t){