Home
last modified time | relevance | path

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

1234567891011

/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/Car/Notification/src/com/android/car/notification/
DCarNotificationItemTouchListener.java223 float absDeltaX = Math.abs(deltaX); in onInterceptTouchEvent()
224 float absDeltaY = Math.abs(deltaY); in onInterceptTouchEvent()
404 boolean isFastEnough = (Math.abs(velocityX) > minVelocity); in isTargetSwipedFastEnough()
405 boolean isIntentional = (Math.abs(velocityX) > Math.abs(velocityY)); in isTargetSwipedFastEnough()
407 boolean hasEnoughMovement = Math.abs(translationX) > minWidthToTranslate; in isTargetSwipedFastEnough()
431 boolean isVelocityHighEnough = (Math.abs(velocityX) > mMinVelocityForSwipeDirection); in isTargetSwipedFarEnough()
435 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/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/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()
/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/
DPagedView.java989 final int xDist = Math.abs(mScroller.getFinalX() - mScroller.getCurrX()); in updateIsBeingDraggedOnTouchDown()
1032 final int diff = (int) Math.abs(primaryDirection - mLastMotion); in determineScrollingStart()
1039 mTotalMotion += Math.abs(mLastMotion - primaryDirection); in determineScrollingStart()
1071 totalDistance = Math.abs(getScrollForPage(adjacentPage) - getScrollForPage(page)); in getScrollProgress()
1182 mTotalMotion += Math.abs(delta); in onTouchEvent()
1249 boolean isSignificantMove = Math.abs(delta) > pageOrientedSize * in onTouchEvent()
1252 mTotalMotion += Math.abs(mLastMotion + mLastMotionRemainder - primaryDirection); in onTouchEvent()
1267 if (Math.abs(delta) > pageOrientedSize * RETURN_TO_ORIGINAL_PAGE_THRESHOLD && in onTouchEvent()
1346 return Math.abs(velocity) > threshold; in shouldFlingForVelocity()
1370 if (!canScroll(Math.abs(vscroll), Math.abs(hscroll))) { in onGenericMotionEvent()
[all …]
/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/modules/NeuralNetworks/tools/test_generator/test_harness/include_legacy/
DTestHarness.h293 float fpRange = fpAtol + fpRtol * std::abs(expected);
297 if (std::abs(expected - actual) > fpRange) {
315 if (std::abs(expected - actual) > quant8AllowedError) {
324 if (std::abs(expected - actual) > 1) {
332 float fpRange = fpAtol + fpRtol * std::abs(static_cast<float>(expected));
336 if (std::abs(static_cast<float>(expected - actual)) > fpRange) {
354 if (std::abs(static_cast<int>(expected) - static_cast<int>(actual)) >
364 if (std::abs(expected - actual) > 1) {
373 if (std::abs(static_cast<int>(expected) - static_cast<int>(actual)) >
/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/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/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/SystemUI/src/com/android/systemui/car/window/
DOverlayPanelViewController.java372 getFlingAnimationUtils().apply(animator, from, to, Math.abs(velocity)); in animate()
455 mPercentageFromEndingEdge = (int) Math.abs(height / getLayout().getHeight() * 100); in calculatePercentageFromEndingEdge()
604 mPercentageFromEndingEdge = (int) Math.abs( in onScroll()
614 if (Math.abs(getLayout().getHeight() - y) in onScroll()
648 if (Math.abs(event1.getX() - event2.getX()) > SWIPE_MAX_OFF_PATH in onFling()
649 || Math.abs(velocityY) < SWIPE_THRESHOLD_VELOCITY) { in onFling()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/
DEdgeBackGesturePanel.java452 boolean isSlow = Math.abs(mVelocityTracker.getXVelocity()) < 500; in triggerBack()
528 float touchTranslation = Math.abs(x - mStartX); in handleMoveEvent()
531 if (Math.abs(delta) > 0) { in handleMoveEvent()
571 if (Math.abs(mTotalTouchDelta) > mMinDeltaForSwitch) { in handleMoveEvent()
587 if (Math.abs(yOffset) > Math.abs(x - mStartX) * 2) { in handleMoveEvent()
605 MathUtils.clamp(Math.abs(yOffset) / (maxYOffset * RUBBER_BAND_AMOUNT), 0, 1); in handleMoveEvent()
DEdgeBackGestureHandler.java201 float dx = Math.abs(ev.getX() - mDownPoint.x); in onMotionEvent()
202 float dy = Math.abs(ev.getY() - mDownPoint.y); in onMotionEvent()
218 float dx = Math.abs(ev.getX() - mDownPoint.x); in onMotionEvent()
219 float dy = Math.abs(ev.getY() - mDownPoint.y); in onMotionEvent()
/packages/apps/Launcher3/quickstep/robolectric_tests/src/com/android/quickstep/util/
DTaskViewSimulatorTest.java195 return Math.abs(item.left - mExpected.left) < mError in matchesSafely()
196 && Math.abs(item.top - mExpected.top) < mError in matchesSafely()
197 && Math.abs(item.right - mExpected.right) < mError in matchesSafely()
198 && Math.abs(item.bottom - mExpected.bottom) < mError; in matchesSafely()
/packages/apps/QuickAccessWallet/src/com/android/systemui/plugin/globalactions/wallet/
DWalletCardCarousel.java233 float scaleFactor = Math.max(UNSELECTED_CARD_SCALE, 1f - Math.abs(position)); in updateCardView()
245 if (Math.abs(viewCenter - center) < mCardCenterToScreenCenterDistancePx) { in updateCardView()
252 mCardCenterToScreenCenterDistancePx = Math.abs(viewCenter - center); in updateCardView()
305 Math.abs(mEdgeToCenterDistance) / mCardEdgeToCenterDistance;
341 Math.max(Math.abs(dx), Math.abs(dy)));
/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/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/modules/NeuralNetworks/runtime/test/generated/spec_V1_2/
Dabs.example.cpp7 namespace generated_tests::abs { namespace
54 namespace generated_tests::abs { namespace
101 namespace generated_tests::abs { namespace
/packages/modules/NeuralNetworks/runtime/test/
DTestUnknownDimensions.cpp118 float fpRange = fpAtol + fpRtol * std::abs(expected); in CompareResults()
122 if (std::abs(expected - actual) > fpRange) { in CompareResults()
137 if (std::abs(expected - actual) > 1) { in CompareResults()
154 float fpRange = fpAtol + fpRtol * std::abs(static_cast<float>(expected)); in CompareResults()
158 if (std::abs(static_cast<float>(expected - actual)) > fpRange) { in CompareResults()

1234567891011