/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/ |
D | BrightnessUtils.java | 19 import android.util.MathUtils; 55 final float normalizedVal = MathUtils.norm(GAMMA_SPACE_MIN, GAMMA_SPACE_MAX, val); in convertGammaToLinear() 58 ret = MathUtils.sq(normalizedVal / R); in convertGammaToLinear() 60 ret = MathUtils.exp((normalizedVal - C) / A) + B; in convertGammaToLinear() 65 return Math.round(MathUtils.lerp(min, max, ret / 12)); in convertGammaToLinear() 78 final float normalizedVal = MathUtils.norm(GAMMA_SPACE_MIN, GAMMA_SPACE_MAX, val); in convertGammaToLinearFloat() 81 ret = MathUtils.sq(normalizedVal / R); in convertGammaToLinearFloat() 83 ret = MathUtils.exp((normalizedVal - C) / A) + B; in convertGammaToLinearFloat() 88 final float normalizedRet = MathUtils.constrain(ret, 0, 12); in convertGammaToLinearFloat() 92 return MathUtils.lerp(min, max, normalizedRet / 12); in convertGammaToLinearFloat() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/animation/ |
D | TransitionLayoutController.kt | 21 import android.util.MathUtils 97 var remappedProgress = MathUtils.map( in getGoneState() 102 remappedProgress = MathUtils.constrain(remappedProgress, 0.0f, 1.0f) in getGoneState() 104 width = MathUtils.lerp( in getGoneState() 108 height = MathUtils.lerp( in getGoneState() 118 val alphaProgress = MathUtils.map( in getGoneState() 120 alpha = MathUtils.constrain(alphaProgress, 0.0f, 1.0f) in getGoneState() 157 alphaProgress = MathUtils.map(GONE_FADE_FRACTION, 1.0f, 0.0f, 1.0f, progress) in getInterpolatedState() 162 newScale = MathUtils.lerp(GONE_SCALE_AMOUNT * endScale, endScale, progress) in getInterpolatedState() 173 resultX = MathUtils.lerp(widgetStart.x - resultMeasureWidth / 2.0f, in getInterpolatedState() [all …]
|
/frameworks/base/packages/SystemUI/animation/src/com/android/systemui/animation/ |
D | Interpolators.java | 19 import android.util.MathUtils; 91 float b = MathUtils.log((overshootAmount + 1) / (overshootAmount)) / overshootStart; in getOvershootInterpolation() 92 return MathUtils.max(0.0f, in getOvershootInterpolation() 103 return MathUtils.max(0.0f, (float) (1.0f - Math.exp(-4 * progress))); in getOvershootInterpolation() 113 fraction = MathUtils.constrainedMap(0f, 1f, 0.3f, 1f, fraction); in getNotificationScrimAlpha() 115 fraction = MathUtils.constrainedMap(0f, 1f, 0f, 0.5f, fraction); in getNotificationScrimAlpha()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/display/ |
D | BrightnessMappingStrategyTest.java | 33 import android.util.MathUtils; 128 final float expectedLevel = MathUtils.map(PowerManager.BRIGHTNESS_OFF + 1, in testSimpleStrategyMappingAtControlPoints() 187 final float expectedLevel = MathUtils.map(DISPLAY_RANGE_NITS[0], DISPLAY_RANGE_NITS[1], in testPhysicalStrategyMappingAtControlPoints() 410 minBrightness = (float) MathUtils.pow(minBrightness, MAXIMUM_GAMMA); // Gamma correction. in assertStrategyAdaptsToUserDataPoints() 516 strategy.addUserDataPoint(x2, (float) MathUtils.pow(y2, gamma)); in testGammaCorrectionLowChangeAtCenter() 517 assertEquals(MathUtils.pow(y1, gamma), strategy.getBrightness(x1), 0.0001f /* tolerance */); in testGammaCorrectionLowChangeAtCenter() 518 assertEquals(MathUtils.pow(y2, gamma), strategy.getBrightness(x2), 0.0001f /* tolerance */); in testGammaCorrectionLowChangeAtCenter() 519 assertEquals(MathUtils.pow(y3, gamma), strategy.getBrightness(x3), 0.0001f /* tolerance */); in testGammaCorrectionLowChangeAtCenter() 545 strategy.addUserDataPoint(x2, (float) MathUtils.pow(y2, gamma)); in testGammaCorrectionHighChangeAtCenter() 546 assertEquals(MathUtils.pow(y1, minGamma), in testGammaCorrectionHighChangeAtCenter() [all …]
|
/frameworks/base/libs/hwui/ |
D | Layer.cpp | 57 return MathUtils::isZero(roundf(x) - x); in isIntegerAligned() 66 if (MathUtils::isZero(matrix.getScaleX()) && MathUtils::isZero(matrix.getScaleY())) { in shouldFilterRect() 78 if (!(MathUtils::areEqual(dstW, srcRect.width()) && in shouldFilterRect() 79 MathUtils::areEqual(dstH, srcRect.height()))) { in shouldFilterRect()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | KeyguardClockPositionAlgorithm.java | 24 import android.util.MathUtils; 243 float clockY = MathUtils.lerp(clockYBouncer, clockYRegular, shadeExpansion); in getClockY() 252 return (int) (MathUtils.lerp(clockY, clockYDark, darkAmount) + mOverStretchAmount); in getClockY() 261 float userSwitchY = MathUtils.lerp(userSwitchYBouncer, userSwitchYRegular, shadeExpansion); in getUserSwitcherY() 276 float qsAlphaFactor = MathUtils.saturate(mQsExpansion / 0.3f); in getClockAlpha() 280 return MathUtils.lerp(alphaKeyguard, 1f, mDarkAmount); in getClockAlpha()
|
/frameworks/base/services/core/java/com/android/server/display/ |
D | BrightnessMappingStrategy.java | 26 import android.util.MathUtils; 402 float maxBrightness = MathUtils.max( in smoothCurve() 405 float newBrightness = MathUtils.constrain( in smoothCurve() 421 float newBrightness = MathUtils.constrain( in smoothCurve() 436 return MathUtils.pow((currLux + LUX_GRAD_SMOOTHING) in permissibleRatio() 456 gamma = MathUtils.log(desiredBrightness) / MathUtils.log(currentBrightness); in inferAutoBrightnessAdjustment() 458 adjustment = -MathUtils.log(gamma) / MathUtils.log(maxGamma); in inferAutoBrightnessAdjustment() 460 adjustment = MathUtils.constrain(adjustment, -1, +1); in inferAutoBrightnessAdjustment() 463 MathUtils.pow(maxGamma, -adjustment) + " == " + gamma); in inferAutoBrightnessAdjustment() 465 MathUtils.pow(currentBrightness, gamma) + " == " + desiredBrightness); in inferAutoBrightnessAdjustment() [all …]
|
/frameworks/base/libs/hwui/pipeline/skia/ |
D | LayerDrawable.cpp | 37 return MathUtils::isZero(roundf(x) - x); in isIntegerAligned() 46 if (MathUtils::isZero(matrix.getScaleX()) && MathUtils::isZero(matrix.getScaleY())) { in shouldFilterRect() 58 if (!(MathUtils::areEqual(dstW, srcRect.width()) && in shouldFilterRect() 59 MathUtils::areEqual(dstH, srcRect.height()))) { in shouldFilterRect()
|
/frameworks/base/core/java/android/hardware/display/ |
D | BrightnessCorrection.java | 25 import android.util.MathUtils; 219 mScale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE); in ScaleAndTranslateLog() 220 mTranslate = MathUtils.constrain(translate, MIN_TRANSLATE, MAX_TRANSLATE); in ScaleAndTranslateLog() 225 return MathUtils.exp(mScale * MathUtils.log(brightness) + mTranslate); in apply()
|
/frameworks/base/packages/SystemUI/src/com/android/keyguard/clock/ |
D | ClockLayout.java | 23 import android.util.MathUtils; 93 final float offsetX = MathUtils.lerp(0f, in positionChildren() 96 final float offsetY = MathUtils.lerp(0f, in positionChildren()
|
D | SmallClockPosition.java | 20 import android.util.MathUtils; 75 return (int) MathUtils.lerp(lockY, aodY, mDarkAmount); in getPreferredY()
|
D | ClockPalette.kt | 20 import android.util.MathUtils 49 hsv[i] = MathUtils.lerp(darkHSV[i], lightHSV[i], darkAmount) in getSecondaryColor()
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/gestures/ |
D | GestureUtils.java | 4 import android.util.MathUtils; 39 return MathUtils.dist(first.getX(), first.getY(), second.getX(), second.getY()); in distance() 54 final float moveDelta = MathUtils.dist(pointerDown.x, pointerDown.y, moveEvent.getX(i), in distanceClosestPointerToPoint()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/util/ |
D | BurnInHelper.kt | 19 import android.util.MathUtils 69 return MathUtils.lerp(0f, amplitude, interpolationAmount) in zigzag()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/ |
D | UdfpsKeyguardView.java | 30 import android.util.MathUtils; 116 mBurnInOffsetX = MathUtils.lerp(0f, in updateBurnInOffsets() 119 mBurnInOffsetY = MathUtils.lerp(0f, in updateBurnInOffsets() 122 mBurnInProgress = MathUtils.lerp(0f, getBurnInProgressOffset(), mInterpolatedDarkAmount); in updateBurnInOffsets()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | BlurUtils.kt | 25 import android.util.MathUtils 61 return MathUtils.lerp(minBlurRadius.toFloat(), maxBlurRadius.toFloat(), ratio).toInt() in blurRadiusOfRatio() 71 return MathUtils.map(minBlurRadius.toFloat(), maxBlurRadius.toFloat(), in ratioOfBlurRadius()
|
/frameworks/base/packages/SystemUI/src/com/android/keyguard/ |
D | TextInterpolator.kt | 25 import android.util.MathUtils in <lambda>() 216 run.baseX[i] = MathUtils.lerp(run.baseX[i], run.targetX[i], progress) in <lambda>() 217 run.baseY[i] = MathUtils.lerp(run.baseY[i], run.targetY[i], progress) in <lambda>() 338 MathUtils.lerp(line.baseX[i], line.targetX[i], progress) in <lambda>() 340 MathUtils.lerp(line.baseY[i], line.targetY[i], progress) in <lambda>() 415 out.textSize = MathUtils.lerp(from.textSize, to.textSize, progress) in <lambda>()
|
D | FontInterpolator.kt | 21 import android.util.MathUtils in <lambda>() 122 MathUtils.lerp( in <lambda>() 127 MathUtils.lerp( in <lambda>() 135 MathUtils.lerp(startValue, endValue, progress) in <lambda>()
|
/frameworks/base/core/java/com/android/internal/graphics/cam/ |
D | Frame.java | 20 import android.util.MathUtils; 140 float c = (f >= 0.9) ? MathUtils.lerp(0.59f, 0.69f, ((f - 0.9f) * 10.0f)) : MathUtils.lerp( in make()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
D | ExpandAnimationParameters.kt | 3 import android.util.MathUtils 51 clipTopAmountCompensation = MathUtils.lerp(0f, startClipTopAmount.toFloat(),
|
/frameworks/base/core/java/android/os/ |
D | ParcelableHolder.java | 22 import android.util.MathUtils; 204 parcel.setDataPosition(MathUtils.addOrThrow(dataStartPos, dataSize)); in readFromParcel() 230 parcel.setDataPosition(MathUtils.addOrThrow(parcel.dataPosition(), dataSize)); in writeToParcel()
|
D | ParcelableParcel.java | 20 import android.util.MathUtils; 45 src.setDataPosition(MathUtils.addOrThrow(pos, size)); in ParcelableParcel()
|
/frameworks/base/core/java/android/service/autofill/ |
D | InlineSuggestionRoot.java | 24 import android.util.MathUtils; 66 final float distance = MathUtils.dist(mDownX, mDownY, in dispatchTouchEvent()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/wallet/ui/ |
D | DotIndicatorDecoration.java | 23 import android.util.MathUtils; 120 float radius = MathUtils.lerp(mSelectedRadius, mUnselectedRadius, progress / 2); in drawSelectedDot() 131 float radius = MathUtils.lerp(mUnselectedRadius, mSelectedColor, progress / 2); in drawFadingUnselectedDot()
|
/frameworks/base/services/core/java/com/android/server/vibrator/ |
D | ClippingAmplitudeAndFrequencyAdapter.java | 23 import android.util.MathUtils; 78 return MathUtils.min(amplitude, info.getMaxAmplitude(frequency)); in clampAmplitude()
|