plattysoft / Leonids

A Particle System for standard Android UI: http://plattysoft.github.io/Leonids/
Apache License 2.0
2.28k stars 398 forks source link

it is wrong that Calculating the distance. #78

Open xiayu98020214 opened 7 years ago

xiayu98020214 commented 7 years ago
public boolean update (long miliseconds) {
    ............
    mCurrentX = mInitialX+mSpeedX*realMiliseconds+mAccelerationX*realMiliseconds*realMiliseconds;

............. return true; }

x=v0t+1/2at^2 , it should be mAccelerationXrealMiliseconds*realMiliseconds/2

plattysoft commented 7 years ago

Good find! Thanks for reporting

I'm reluctant to change it because that will make all the animations that are currently using the acceleration parameter work wrong.

Probably for the next release with a note on changing behaviour.