Lines Matching refs:velocity

85      * velocity which is preserved in the bounce when the horizontal edge is reached. A null value
102 * velocity which is preserved in the bounce when the horizontal edge is reached. A null value
171 * Returns the absolute value of the current velocity.
173 * @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;
802 final float distanceToApex = velocity * velocity / 2.0f / Math.abs(mDeceleration);
811 private void startBounceAfterEdge(int start, int end, int velocity) {
812 mDeceleration = getDeceleration(velocity == 0 ? start - end : velocity);
813 fitOnBounceCurve(start, end, velocity);
817 private void startAfterEdge(int start, int min, int max, int velocity) {
826 boolean keepIncreasing = overDistance * velocity >= 0;
828 // Will result in a bounce or a to_boundary depending on velocity.
829 startBounceAfterEdge(start, edge, velocity);
831 final double totalDistance = getSplineFlingDistance(velocity);
833 fling(start, velocity, positive ? min : start, positive ? start : max, mOver);
835 startSpringback(start, edge, velocity);
845 // We were in fling/scroll mode before: current velocity is such that distance to
871 // Duration from start to null velocity
898 * Update the current position and velocity for current time. Returns