setVelocity method

Spring setVelocity(
  1. double velocity
)

set the velocity on the spring in pixels per second @param velocity velocity value @return the spring for chaining

Implementation

Spring setVelocity(double velocity) {
  if (velocity == _mCurrentState.velocity) {
    return this;
  }
  _mCurrentState.velocity = velocity;
  _mSpringSystem.activateSpring(this.getId());
  return this;
}