Home
last modified time | relevance | path

Searched refs:abs (Results 1 – 25 of 216) sorted by relevance

123456789

/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/
DCodePointUtils.java75 final int r = Math.abs(random.nextInt()); in generateCodePointSet()
104 final int count = 1 + (Math.abs(random.nextInt()) % 5) in generateWord()
105 + (Math.abs(random.nextInt()) % 5) in generateWord()
106 + (Math.abs(random.nextInt()) % 5) in generateWord()
107 + (Math.abs(random.nextInt()) % 5) in generateWord()
108 + (Math.abs(random.nextInt()) % 5) in generateWord()
109 + (Math.abs(random.nextInt()) % 5) in generateWord()
110 + (Math.abs(random.nextInt()) % 5) in generateWord()
111 + (Math.abs(random.nextInt()) % 5); in generateWord()
113 builder.appendCodePoint(codePointSet[Math.abs(random.nextInt()) % codePointSet.length]); in generateWord()
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/
DEclipseControl.java152 float raddx = mDownRadiusY - Math.abs(mDownX - mDownCenterY); in actionMove()
153 oval.setRadiusY(Math.abs(x - oval.getCenterY() + sign * raddx)); in actionMove()
155 float raddy = mDownRadiusY - Math.abs(mDownY - mDownCenterY); in actionMove()
156 oval.setRadiusY(Math.abs(y - oval.getCenterY() + sign * raddy)); in actionMove()
163 float raddy = mDownRadiusX - Math.abs(mDownY - mDownCenterX); in actionMove()
164 oval.setRadiusX(Math.abs(y - oval.getCenterX() + sign * raddy)); in actionMove()
166 float raddx = mDownRadiusX - Math.abs(mDownX - mDownCenterX); in actionMove()
167 oval.setRadiusX(Math.abs(x - oval.getCenterX() - sign * raddx)); in actionMove()
178 float downRad = Math.abs(ctr_dx) + Math.abs(ctr_dy) - dr; in actionMove()
181 float r = (Math.abs(rx) + Math.abs(ry)) * sin45; in actionMove()
[all …]
/packages/apps/Dialer/java/com/android/incallui/answer/impl/utils/
DFlingAnimationUtils.java65 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply()
79 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply()
125 (float) (this.maxLengthSeconds * Math.sqrt(Math.abs(endValue - currValue) / maxDistance)); in getProperties()
126 float diff = Math.abs(endValue - currValue); in getProperties()
127 float velAbs = Math.abs(velocity); in getProperties()
197 (this.maxLengthSeconds * Math.pow(Math.abs(endValue - currValue) / maxDistance, 0.5f)); in getDismissingProperties()
198 float diff = Math.abs(endValue - currValue); in getDismissingProperties()
199 float velAbs = Math.abs(velocity); in getDismissingProperties()
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
DSwipeHelper.java228 float deltaY = Math.abs(currY - mInitialTouchPosY); in onInterceptTouchEvent()
229 float deltaX = Math.abs(currX - mInitialTouchPosX); in onInterceptTouchEvent()
240 if (Math.abs(delta) > mPagingTouchSlop) { in onInterceptTouchEvent()
298 (int) (Math.abs(newPos - animView.getTranslationX()) * 1000f / Math in determineDuration()
299 .abs(velocity))); in determineDuration()
371 if (Math.abs(deltaX) < minDistance) { in onTouchEvent()
381 if (Math.abs(deltaX) >= size) { in onTouchEvent()
412 float translation = Math.abs(mCurrAnimView.getTranslationX()); in onTouchEvent()
419 boolean childSwipedFastEnough = (Math.abs(velocity) > escapeVelocity) in onTouchEvent()
420 && (Math.abs(velocity) > Math.abs(perpendicularVelocity)) in onTouchEvent()
DGmailDragHelper.java138 final float deltaX = Math.abs(evX - mInitialInterceptedX); in processTouchEvent()
139 final float deltaY = Math.abs(ev.getY() - mInitialInterceptedY); in processTouchEvent()
171 Math.abs(xVelocity) > mConfiguration.getScaledMinimumFlingVelocity(); in setDragging()
/packages/apps/Messaging/src/com/android/messaging/ui/conversationlist/
DConversationListSwipeHelper.java134 final float absDeltaX = Math.abs(deltaX); in onInterceptTouchEvent()
135 final float absDeltaY = Math.abs(deltaY); in onInterceptTouchEvent()
408 return (Math.abs(velocityX) > minVelocity) // Fast enough. in isTargetSwipedFastEnough()
409 && (Math.abs(velocityX) > Math.abs(velocityY)) // Not unintentional. in isTargetSwipedFastEnough()
411 && Math.abs(translationX) > in isTargetSwipedFastEnough()
426 && Math.abs(translationX) > in isTargetSwipedFarEnough()
432 final float durationInSeconds = Math.abs(deltaPosition / velocity); in calculateTranslationDuration()
/packages/apps/Car/Notification/src/com/android/car/notification/
DCarNotificationItemTouchListener.java240 float absDeltaX = Math.abs(deltaX); in onInterceptTouchEvent()
241 float absDeltaY = Math.abs(deltaY); in onInterceptTouchEvent()
428 boolean isFastEnough = (Math.abs(velocityX) > minVelocity); in isTargetSwipedFastEnough()
429 boolean isIntentional = (Math.abs(velocityX) > Math.abs(velocityY)); in isTargetSwipedFastEnough()
431 boolean hasEnoughMovement = Math.abs(translationX) > minWidthToTranslate; in isTargetSwipedFastEnough()
455 boolean isVelocityHighEnough = (Math.abs(velocityX) > mMinVelocityForSwipeDirection); in isTargetSwipedFarEnough()
459 boolean hasEnoughMovement = Math.abs(translationX) > minWidthToTranslate; in isTargetSwipedFarEnough()
DHeadsUpNotificationOnTouchListener.java96 float absVelocityX = Math.abs(velocityX); in onTouch()
97 float absVelocityY = Math.abs(mVelocityTracker.getYVelocity()); in onTouch()
100 if (Math.abs(deltaX) > viewWidth * THRESHOLD) { in onTouch()
147 if (Math.abs(deltaX) > TOUCH_SLOP) { in onTouch()
168 1f - 2f * Math.abs(deltaX) / viewWidth))); in onTouch()
/packages/apps/Camera2/jni/
Djpegutil.cpp65 output_width_ = abs(one_x - orig_x); in Transform()
66 output_height_ = abs(one_y - orig_y); in Transform()
73 output_width_ = abs(one_y - orig_y); in Transform()
74 output_height_ = abs(one_x - orig_x); in Transform()
81 output_width_ = abs(one_y - orig_y); in Transform()
82 output_height_ = abs(one_x - orig_x); in Transform()
89 output_width_ = abs(one_x - orig_x); in Transform()
90 output_height_ = abs(one_y - orig_y); in Transform()
/packages/apps/Launcher3/src/com/android/launcher3/
DPagedView.java897 final int xDist = Math.abs(mScroller.getFinalPos() - mScroller.getCurrPos()); in onInterceptTouchEvent()
949 final int xDiff = (int) Math.abs(x - mLastMotionX); in determineScrollingStart()
956 mTotalMotionX += Math.abs(mLastMotionX - x); in determineScrollingStart()
992 totalDistance = Math.abs(getScrollForPage(adjacentPage) - getScrollForPage(page)); in getScrollProgress()
1137 mTotalMotionX += Math.abs(deltaX); in onTouchEvent()
1142 if (Math.abs(deltaX) >= 1.0f) { in onTouchEvent()
1164 boolean isSignificantMove = Math.abs(deltaX) > pageWidth * in onTouchEvent()
1167 mTotalMotionX += Math.abs(mLastMotionX + mLastMotionXRemainder - x); in onTouchEvent()
1177 if (Math.abs(deltaX) > pageWidth * RETURN_TO_ORIGINAL_PAGE_THRESHOLD && in onTouchEvent()
1268 return Math.abs(velocityX) > mFlingThresholdVelocity; in shouldFlingForVelocity()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/util/
DOverScroller.java477 if (Math.abs(tx - alpha) < 1E-5) break;
489 if (Math.abs(dy - alpha) < 1E-5) break;
532 final float x = Math.abs((float) newDistance / oldDistance); in adjustDuration()
633 mOver = Math.abs(delta); in startSpringback()
674 return Math.log(INFLEXION * Math.abs(velocity) / (mFlingFriction * mPhysicalCoeff)); in getSplineDeceleration()
695 final float distanceToApex = velocitySquared / 2.0f / Math.abs(mDeceleration); in fitOnBounceCurve()
696 final float distanceToEdge = Math.abs(end - start); in fitOnBounceCurve()
698 2.0 * (distanceToApex + distanceToEdge) / Math.abs(mDeceleration)); in fitOnBounceCurve()
725 if (totalDistance > Math.abs(overDistance)) { in startAfterEdge()
748 float distance = velocitySquared / (2.0f * Math.abs(mDeceleration)); in onEdgeReached()
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/
DMediaPickerPanel.java475 final float maxAbsDelta = Math.max(Math.abs(dx), Math.abs(dy)); in shouldAllowRecaptureTouch()
498 if ((dx == 0 || (Math.abs(dy) / Math.abs(dx)) > DIRECTION_RATIO) && in onTouch()
499 Math.abs(yVelocity) > mFlingThresholdPx) { in onTouch()
538 if (Math.abs(dy) > mTouchSlop && in onTouch()
539 (Math.abs(dy) / Math.abs(dx)) > DIRECTION_RATIO) { in onTouch()
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DOverScroller.java615 if (Math.abs(tx - alpha) < 1E-5) break;
627 if (Math.abs(dy - alpha) < 1E-5) break;
670 final float x = Math.abs((float) newDistance / oldDistance); in adjustDuration()
744 mOver = Math.abs(delta); in startSpringback()
785 return Math.log(INFLEXION * Math.abs(velocity) / (mFlingFriction * PHYSICAL_COEF)); in getSplineDeceleration()
804 final float distanceToApex = velocity * velocity / 2.0f / Math.abs(mDeceleration); in fitOnBounceCurve()
805 final float distanceToEdge = Math.abs(end - start); in fitOnBounceCurve()
807 2.0 * (distanceToApex + distanceToEdge) / Math.abs(mDeceleration)); in fitOnBounceCurve()
834 if (totalDistance > Math.abs(overDistance)) { in startAfterEdge()
855 float distance = mVelocity * mVelocity / (2.0f * Math.abs(mDeceleration)); in onEdgeReached()
/packages/apps/Launcher3/src/com/android/launcher3/touch/
DOverScroll.java46 f = f / (Math.abs(f)) * (overScrollInfluenceCurve(Math.abs(f))); in dampedScroll()
49 if (Math.abs(f) >= 1) { in dampedScroll()
50 f /= Math.abs(f); in dampedScroll()
DSwipeDetector.java94 return Math.abs(ev.getX(pointerIndex) - downPos.x);
128 return Math.abs(ev.getY(pointerIndex) - downPos.y);
274 > Math.abs(mDisplacement)) { in shouldScrollStart()
411 mListener.onDragEnd(velocity, Math.abs(velocity) > RELEASE_VELOCITY_PX_MS); in reportDragEnd()
416 float velocityDivisor = Math.max(2f, Math.abs(0.5f * velocity)); in calculateDuration()
/packages/apps/Dialer/java/com/android/incallui/answer/impl/answermethod/
DFlingUpDownTouchHandler.java274 if (Math.abs(deltaY) > touchSlop) { in onTouch()
277 if (Math.abs(deltaY) >= falsingThresholdPx) { in onTouch()
295 || Math.abs(pointerY - initialTouchY) > touchSlop in endMotionEvent()
341 if (!flingEnabled || Math.abs(vectorVel) < minVelocityPxPerSecond) { in getFlingTarget()
343 if (Math.abs(progress) > PROGRESS_SWIPE_RECENTER) { in getFlingTarget()
352 if (!sameDirection && Math.abs(progress) >= PROGRESS_FLING_RECENTER) { in getFlingTarget()
490 if (Math.abs(progress) > HINT_MOVE_THRESHOLD_RATIO) { in setCurrentProgress()
/packages/apps/Gallery/src/com/android/camera/
DHighlightView.java191 if (Math.abs(delta) <= hysteresis) { in getHit()
192 if (Math.abs(distY) > Math.abs(distX)) { in getHit()
219 if ((Math.abs(r.left - x) < hysteresis) && verticalCheck) { in getHit()
222 if ((Math.abs(r.right - x) < hysteresis) && verticalCheck) { in getHit()
225 if ((Math.abs(r.top - y) < hysteresis) && horizCheck) { in getHit()
228 if ((Math.abs(r.bottom - y) < hysteresis) && horizCheck) { in getHit()
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DPhotoView.java421 if (Math.abs(mUndoIndexHint - mModel.getCurrentIndex()) >= 3) { in notifyDataChange()
1039 mFirstScrollX = (Math.abs(dx) > Math.abs(dy)); in onScroll()
1069 if (Math.abs(delta) >= size) { in calculateDeltaY()
1085 flingImages(velocityX, velocityY, Math.abs(e2.getY() - e1.getY())); in onFling()
1097 if (Math.abs(velocityX) > Math.abs(velocityY)) { in flingImages()
1111 boolean fastEnough = (Math.abs(vy) > escapeVelocity) in flingImages()
1112 && (Math.abs(vy) > Math.abs(vx)) in flingImages()
1284 if (Math.abs(r.centerY() - h * 0.5f) > 0.4f * h) {
1559 if (!isMinimal && Math.abs(velocityY) > Math.abs(velocityX))
1758 1 - Math.abs(scrollProgress)) : 1.0f; in getScrollAlpha()
[all …]
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/widget/
DPagedSnapHelper.java120 int absDistance = Math.abs(distanceToTopMargin(layoutManager, child, helper)); in findTopView()
158 return 1.f - ((float) (Math.abs(viewStart) + Math.abs(viewEnd)) / viewHeight); in getPercentageVisible()
162 return 1.f - ((float) Math.abs(viewStart) / helper.getDecoratedMeasurement(view)); in getPercentageVisible()
166 return 1.f - ((float) Math.abs(viewEnd) / helper.getDecoratedMeasurement(view)); in getPercentageVisible()
/packages/apps/LegacyCamera/src/com/android/camera/
DUtil.java364 int dist = Math.abs(orientation - orientationHistory); in roundOrientation()
400 if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue; in getOptimalPreviewSize()
401 if (Math.abs(size.height - targetHeight) < minDiff) { in getOptimalPreviewSize()
403 minDiff = Math.abs(size.height - targetHeight); in getOptimalPreviewSize()
413 if (Math.abs(size.height - targetHeight) < minDiff) { in getOptimalPreviewSize()
415 minDiff = Math.abs(size.height - targetHeight); in getOptimalPreviewSize()
434 if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue; in getOptimalVideoSnapshotPictureSize()
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/
DFallbackNoButtonInputConsumer.java191 if (mDisableHorizontalSwipe && Math.abs(mLastPos.x - mDownPos.x) in onMotionEvent()
192 > Math.abs(mLastPos.y - mDownPos.y)) { in onMotionEvent()
198 if (Math.abs(displacement) >= mTouchSlop) { in onMotionEvent()
267 boolean isFling = Math.abs(velocity) > flingThreshold; in finishTouchTracking()
296 * MAX_SWIPE_DURATION / Math.abs(PROGRESS_TO_END_GESTURE));
/packages/apps/Camera2/src/com/android/camera/ui/motion/
DUnitBezier.java82 if (Math.abs(value) < EPSILON) { in solve()
86 if (Math.abs(derivative) < EPSILON) { in solve()
106 if (Math.abs(value - target) < EPSILON) { in solve()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/asset/
DAsset.java61 : Math.abs(imageView.getLayoutParams().width); in getImageViewDimensions()
64 : Math.abs(imageView.getLayoutParams().height); in getImageViewDimensions()
150 : Math.abs(imageView.getLayoutParams().width); in loadDrawable()
153 : Math.abs(imageView.getLayoutParams().height); in loadDrawable()
/packages/apps/Messaging/src/com/android/messaging/util/
DCubicBezierInterpolator.java92 if (Math.abs(value - x) < epsilon) { in getTForXValue()
94 } else if (Math.abs(derivative) < epsilon) { in getTForXValue()
108 for (int i = 0; Math.abs(value - x) > epsilon && i < iterations; i++) { in getTForXValue()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/widget/
DScrollController.java749 mMainHorizontal = Math.abs(dx) >= Math.abs(dy); in updateDirection()
809 float curDx = Math.abs(mFlingScroller.getFinalX() - mFlingScroller.getStartX()); in startScroll()
810 float curDy = Math.abs(mFlingScroller.getFinalY() - mFlingScroller.getStartY()); in startScroll()
815 int durationX = velocityX ==0 ? 0 : (int)((Math.abs(dx) * 1000) / velocityX); in startScroll()
816 int durationY = velocityY ==0 ? 0 : (int)((Math.abs(dy) * 1000) / velocityY); in startScroll()

123456789