Lines Matching refs:velocity

23  * velocity) and gradually slows down. The fling animation will come to a stop when the velocity of
33 * // Sets the start velocity to -2000 (pixel/s)
128 * Start velocity of the animation. Default velocity is 0. Unit: pixel/second
130 * <p>A <b>non-zero</b> start velocity is required for a FlingAnimation. If no start velocity is
131 * set through {@link #setStartVelocity(float)}, the start velocity defaults to 0. In that
134 * <p>Note when using a fixed value as the start velocity (as opposed to getting the velocity
145 * @param startVelocity start velocity of the animation in pixel/second
146 * @return the Animation whose start velocity is being set
178 float getAcceleration(float value, float velocity) {
179 return mFlingForce.getAcceleration(value, velocity);
183 boolean isAtEquilibrium(float value, float velocity) {
186 || mFlingForce.isAtEquilibrium(value, velocity);
198 // This multiplier is used to calculate the velocity threshold given a certain value
200 // then the velocity is a reasonable threshold.
205 // Internal state to hold a value/velocity pair.
216 MassState updateValueAndVelocity(float value, float velocity, long deltaT) {
217 mMassState.mVelocity = (float) (velocity * Math.exp((deltaT / 1000f) * mFriction));
218 mMassState.mValue = (float) (value - velocity / mFriction
219 + velocity / mFriction * Math.exp(mFriction * deltaT / 1000f));
227 public float getAcceleration(float position, float velocity) {
228 return velocity * mFriction;
232 public boolean isAtEquilibrium(float value, float velocity) {
233 return Math.abs(velocity) < mVelocityThreshold;