计算触摸平均速度效果比较好的方式

来源:互联网 发布:我国网络安全法 编辑:程序博客网 时间:2024/05/02 04:51
float lambda = 0.8f; // the closer to 1 the higher weight to the next touch  newSpeed = (1.0 - lambda) * oldSpeed + lambda* (distanceFromPrevious/timeSincePrevious);oldSpeed = newSpeed;

0 0
原创粉丝点击