Lines Matching defs:velocity

88      * velocity which is preserved in the bounce when the horizontal edge is reached. A null value
105 * velocity which is preserved in the bounce when the horizontal edge is reached. A null value
178 * Returns the absolute value of the current velocity.
180 * @return The original velocity less the deceleration, norm of the X and Y velocity vector.
406 * depend on the initial velocity of the fling.
410 * @param velocityX Initial velocity of the fling (X) measured in pixels per
412 * @param velocityY Initial velocity of the fling (Y) measured in pixels per
548 // Initial velocity
551 // Current velocity
653 * Get a signed deceleration that will reduce the velocity.
655 static private float getDeceleration(int velocity) {
656 return velocity > 0 ? -GRAVITY : GRAVITY;
730 private void startSpringback(int start, int end, int velocity) {
738 // TODO take velocity into account
744 void fling(int start, int velocity, int min, int max, int over) {
747 mCurrVelocity = mVelocity = velocity;
753 startAfterEdge(start, min, max, velocity);
760 if (velocity != 0) {
761 mDuration = mSplineDuration = getSplineFlingDuration(velocity);
762 totalDistance = getSplineFlingDistance(velocity);
765 mSplineDistance = (int) (totalDistance * Math.signum(velocity));
780 private double getSplineDeceleration(int velocity) {
781 return Math.log(INFLEXION * Math.abs(velocity) / (mFlingFriction * mPhysicalCoeff));
784 private double getSplineFlingDistance(int velocity) {
785 final double l = getSplineDeceleration(velocity);
791 private int getSplineFlingDuration(int velocity) {
792 final double l = getSplineDeceleration(velocity);
797 private void fitOnBounceCurve(int start, int end, int velocity) {
799 final float durationToApex = - velocity / mDeceleration;
801 final float velocitySquared = (float) velocity * velocity;
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
873 // Duration from start to null velocity
900 * Update the current position and velocity for current time. Returns