Lines Matching refs:velocity

88      * velocity which is preserved in the bounce when the horizontal edge is reached. A null value
106 * velocity which is preserved in the bounce when the horizontal edge is reached. A null value
180 * Returns the absolute value of the current velocity.
182 * @return The original velocity less the deceleration, norm of the X and Y velocity vector.
408 * depend on the initial velocity of the fling.
412 * @param velocityX Initial velocity of the fling (X) measured in pixels per
414 * @param velocityY Initial velocity of the fling (Y) measured in pixels per
550 // Initial velocity
553 // Current velocity
655 * Get a signed deceleration that will reduce the velocity.
657 static private float getDeceleration(int velocity) {
658 return velocity > 0 ? -GRAVITY : GRAVITY;
732 private void startSpringback(int start, int end, int velocity) {
740 // TODO take velocity into account
746 void fling(int start, int velocity, int min, int max, int over) {
749 mCurrVelocity = mVelocity = velocity;
755 startAfterEdge(start, min, max, velocity);
762 if (velocity != 0) {
763 mDuration = mSplineDuration = getSplineFlingDuration(velocity);
764 totalDistance = getSplineFlingDistance(velocity);
767 mSplineDistance = (int) (totalDistance * Math.signum(velocity));
782 private double getSplineDeceleration(int velocity) {
783 return Math.log(INFLEXION * Math.abs(velocity) / (mFlingFriction * mPhysicalCoeff));
786 private double getSplineFlingDistance(int velocity) {
787 final double l = getSplineDeceleration(velocity);
793 private int getSplineFlingDuration(int velocity) {
794 final double l = getSplineDeceleration(velocity);
799 private void fitOnBounceCurve(int start, int end, int velocity) {
801 final float durationToApex = - velocity / mDeceleration;
803 final float velocitySquared = (float) velocity * velocity;
813 private void startBounceAfterEdge(int start, int end, int velocity) {
814 mDeceleration = getDeceleration(velocity == 0 ? start - end : velocity);
815 fitOnBounceCurve(start, end, velocity);
819 private void startAfterEdge(int start, int min, int max, int velocity) {
828 boolean keepIncreasing = overDistance * velocity >= 0;
830 // Will result in a bounce or a to_boundary depending on velocity.
831 startBounceAfterEdge(start, edge, velocity);
833 final double totalDistance = getSplineFlingDistance(velocity);
835 fling(start, velocity, positive ? min : start, positive ? start : max, mOver);
837 startSpringback(start, edge, velocity);
847 // We were in fling/scroll mode before: current velocity is such that distance to
875 // Duration from start to null velocity
902 * Update the current position and velocity for current time. Returns