@MediumTest public void testStabilityInSpace(){
  long t=System.currentTimeMillis();
  VelocityTracker vt=VelocityTracker.obtain();
  drag(vt,100,200,100,200,10,t,400);
  vt.computeCurrentVelocity(1);
  float firstX=vt.getXVelocity();
  float firstY=vt.getYVelocity();
  vt.clear();
  drag(vt,200,300,200,300,10,t,400);
  vt.computeCurrentVelocity(1);
  float secondX=vt.getXVelocity();
  float secondY=vt.getYVelocity();
  assertEqualFuzzy(firstX,secondX,0.1f);
  assertEqualFuzzy(firstY,secondY,0.1f);
  vt.recycle();
}

@ MediumTest public void testStabilityInSpace ( ) { long t = System . currentTimeMillis ( ) ; VelocityTracker vt = VelocityTracker . obtain ( ) ; drag ( vt , 100 , 200 , 100 , 200 , 10 , t , 400 ) ; vt . computeCurrentVelocity ( 1 ) ; float firstX = vt . getXVelocity ( ) ; float firstY = vt . getYVelocity ( ) ; vt . clear ( ) ; drag ( vt , 200 , 300 , 200 , 300 , 10 , t , 400 ) ; vt . computeCurrentVelocity ( 1 ) ; float secondX = vt . getXVelocity ( ) ; float secondY = vt . getYVelocity ( ) ; assertEqualFuzzy ( firstX , secondX , 0.1f ) ; assertEqualFuzzy ( firstY , secondY , 0.1f ) ; vt . recycle ( ) ; }
velocity is independent of the position of the events , it only depends on their relative distance .
