/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/ |
D | CodePointUtils.java | 75 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/ |
D | EclipseControl.java | 152 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/modules/Uwb/service/java/com/android/server/uwb/correction/primers/ |
D | BackAzimuthPrimer.java | 23 import static java.lang.Math.abs; 152 if (abs(prediction.azimuth) > F_HALF_PI in prime() 153 && abs(mLastAzimuthPrediction) <= F_HALF_PI) { in prime() 157 } else if (abs(prediction.azimuth) <= F_HALF_PI in prime() 158 && abs(mLastAzimuthPrediction) > F_HALF_PI) { in prime() 193 normalizeRadians(abs(normalTheory.azimuth - mLastInput.azimuth)); in prime() 196 float normalDifference = abs(normalizeRadians(normalTheory.azimuth - normalInput.azimuth)); in prime() 197 float mirrorDifference = abs(normalizeRadians(mirrorTheory.azimuth - mirrorInput.azimuth)); in prime() 371 signum(vector.azimuth) * (F_PI - abs(vector.azimuth)), in mirrorAzimuth() 385 if (back == abs(vector.azimuth) < F_HALF_PI) { in forceAzimuth()
|
/packages/apps/Dialer/java/com/android/incallui/answer/impl/utils/ |
D | FlingAnimationUtils.java | 65 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/WallpaperPicker2/src/com/android/wallpaper/picker/preview/ui/util/ |
D | CropSizeUtil.kt | 21 import kotlin.math.abs 46 if (abs(x - point.x) <= abs(y - point.y)) { in Rect() 53 if (abs(x - point.x) >= abs(y - point.y)) { in Rect()
|
/packages/apps/Launcher3/src/com/android/launcher3/touch/ |
D | OverScroll.java | 46 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/modules/Uwb/service/java/com/android/server/uwb/correction/math/ |
D | AoaVector.java | 21 import static java.lang.Math.abs; 79 float ae = abs(elevation); in AoaVector() 95 boolean backFacing = abs(azimuth) > F_HALF_PI; in AoaVector() 99 float angleSum = abs(laz) + abs(elevation); in AoaVector() 207 boolean mirrored = abs(azimuth) > F_HALF_PI; in fromSphericalVector() 237 if (abs(azimuth) < F_HALF_PI) { in toCartesian()
|
D | SphericalVector.java | 21 import static java.lang.Math.abs; 67 float ae = abs(elevation); in SphericalVector() 157 boolean mirrored = abs(azimuth) > F_HALF_PI; in fromAoAVector() 192 float z = distance * (float) abs(cos(elevation) * cos(azimuth)); in toCartesian() 193 if (abs(azimuth) <= F_HALF_PI) { in toCartesian()
|
/packages/modules/Uwb/service/tests/src/com/android/server/uwb/correction/math/ |
D | QuaternionTest.java | 24 import static java.lang.Math.abs; 38 assertTrue(abs(ypr.x - 0.5) < 0.001); in testYawPitchRoll() 39 assertTrue(abs(ypr.y - 1) < 0.001); in testYawPitchRoll() 40 assertTrue(abs(ypr.z - 1.5) < 0.001); in testYawPitchRoll()
|
/packages/apps/Messaging/src/com/android/messaging/ui/conversationlist/ |
D | ConversationListSwipeHelper.java | 134 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/Camera2/jni/ |
D | jpegutil.cpp | 65 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/Car/Notification/src/com/android/car/notification/ |
D | HeadsUpNotificationOnTouchListener.java | 174 if (Math.abs(deltaInDismissAxis) > mDismissDelta) { in onTouch() 215 if (Math.abs(deltaInDismissAxis) > mTouchSlop) { in onTouch() 291 float fractionMoved = Math.abs(translation) / Math.abs(maxTranslation); in getAlphaForDismissingView() 304 Math.abs(velocityInDismissingDirection) > Math.abs(velocityInOppositeDirection); in isFlingEnoughForDismiss() 305 return mMinimumFlingVelocity <= Math.abs(velocityInDismissingDirection) in isFlingEnoughForDismiss()
|
D | CarNotificationItemTouchListener.java | 236 float absDeltaX = Math.abs(deltaX); in onInterceptTouchEvent() 237 float absDeltaY = Math.abs(deltaY); in onInterceptTouchEvent() 436 boolean isFastEnough = (Math.abs(velocityX) > minVelocity); in isTargetSwipedFastEnough() 437 boolean isIntentional = (Math.abs(velocityX) > Math.abs(velocityY)); in isTargetSwipedFastEnough() 439 boolean hasEnoughMovement = Math.abs(translationX) > minWidthToTranslate; in isTargetSwipedFastEnough() 461 boolean isVelocityHighEnough = (Math.abs(velocityX) > mMinVelocityForSwipeDirection); in isTargetSwipedFarEnough() 465 boolean hasEnoughMovement = Math.abs(translationX) > minWidthToTranslate; in isTargetSwipedFarEnough()
|
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/ |
D | MediaPickerPanel.java | 475 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/WallpaperPicker2/src/com/android/wallpaper/picker/ |
D | HorizontalTouchMovementAwareNestedScrollView.kt | 23 import kotlin.math.abs 44 val xMoveDistance = abs(event.x - startXPosition) in onInterceptTouchEvent() 45 val yMoveDistance = abs(event.y - startYPosition) in onInterceptTouchEvent()
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | OverScroller.java | 615 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/Car/SystemUI/src/com/android/systemui/car/window/ |
D | OverlayPanelViewController.java | 400 getFlingAnimationUtils().apply(animator, from, to, Math.abs(velocity)); 496 Math.abs(height / getLayout().getHeight() * 100)); in calculatePercentageFromEndingEdge() 505 mPercentageCursorPositionOnScreen = Math.round(Math.abs(y / mScreenHeightPx * 100)); in calculatePercentageCursorPositionOnScreen() 669 mPercentageFromEndingEdge = (int) Math.abs( in onScroll() 671 mPercentageCursorPositionOnScreen = (int) Math.abs(y / mScreenHeightPx * 100); in onScroll() 680 if (Math.abs(getLayout().getHeight() - y) in onScroll() 714 if (Math.abs(event1.getX() - event2.getX()) > SWIPE_MAX_OFF_PATH in onFling() 715 || Math.abs(velocityY) < SWIPE_THRESHOLD_VELOCITY) { in onFling()
|
/packages/apps/Dialer/java/com/android/incallui/answer/impl/answermethod/ |
D | FlingUpDownTouchHandler.java | 274 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/Launcher3/quickstep/tests/multivalentTests/src/com/android/quickstep/util/ |
D | TaskViewSimulatorTest.java | 175 boundsR.set(0, 0, Math.abs(boundsR.width()), Math.abs(boundsR.height())); in verifyNoTransforms() 263 return Math.abs(item.left - mExpected.left) < errorWidth in matchesSafely() 264 && Math.abs(item.top - mExpected.top) < errorHeight in matchesSafely() 265 && Math.abs(item.right - mExpected.right) < errorWidth in matchesSafely() 266 && Math.abs(item.bottom - mExpected.bottom) < errorHeight; in matchesSafely()
|
/packages/apps/Gallery/src/com/android/camera/ |
D | HighlightView.java | 191 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/modules/Uwb/service/java/com/android/server/uwb/correction/pose/ |
D | IntegPoseSource.java | 20 import static java.lang.Math.abs; 138 mAccelCal.x + min(abs(accel.x), CALIBRATION_COEFFICIENT) * signum(accel.x), in onSensorChanged() 139 mAccelCal.y + min(abs(accel.y), CALIBRATION_COEFFICIENT) * signum(accel.y), in onSensorChanged() 140 mAccelCal.z + min(abs(accel.z), CALIBRATION_COEFFICIENT) * signum(accel.z) in onSensorChanged()
|
/packages/apps/Camera2/src/com/android/camera/ui/motion/ |
D | UnitBezier.java | 82 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/modules/NeuralNetworks/tools/test_generator/test_harness/include_legacy/ |
D | TestHarness.h | 293 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/Launcher3/src/com/android/launcher3/ |
D | PagedView.java | 978 int distance = Math.abs(neighbourPageIndex - currentPage); in dispatchUnhandledMove() 1127 final int xDist = Math.abs(mScroller.getFinalX() - mScroller.getCurrX()); in updateIsBeingDraggedOnTouchDown() 1170 final int diff = (int) Math.abs(primaryDirection - mLastMotion); in determineScrollingStart() 1177 mTotalMotion += Math.abs(mLastMotion - primaryDirection); in determineScrollingStart() 1207 totalDistance = Math.abs(getScrollForPage(adjacentPage) - getScrollForPage(page)); in getScrollProgress() 1322 mTotalMotion += Math.abs(delta); in onTouchEvent() 1395 boolean isSignificantMove = isSignificantMove(Math.abs(delta), pageOrientedSize); in onTouchEvent() 1397 mTotalMotion += Math.abs(mLastMotion - primaryDirection); in onTouchEvent() 1412 if (Math.abs(delta) > pageOrientedSize * RETURN_TO_ORIGINAL_PAGE_THRESHOLD && in onTouchEvent() 1508 return Math.abs(velocity) > threshold; in shouldFlingForVelocity() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | CubicBezierInterpolator.java | 92 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()
|