/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/ |
H A D | BrightnessUtils.java | 19 import android.util.MathUtils; 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() 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() 131 final float normalizedVal = MathUtils.norm(min, max, val) * 12; in convertLinearToGammaFloat() 134 ret = MathUtils.sqrt(normalizedVal) * R; in convertLinearToGammaFloat() [all …]
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/util/animation/ |
H A D | TransitionLayoutController.kt | 21 import android.util.MathUtils 97 var remappedProgress = MathUtils.map( 102 remappedProgress = MathUtils.constrain(remappedProgress, 0.0f, 1.0f) 104 width = MathUtils.lerp( 108 height = MathUtils.lerp( 118 val alphaProgress = MathUtils.map( 120 alpha = MathUtils.constrain(alphaProgress, 0.0f, 1.0f) 199 resultX = MathUtils.lerp(widgetStart.x, 202 resultY = MathUtils.lerp(widgetStart.y, 242 contentTranslation.x = MathUtils.lerp( [all …]
|
/aosp12/frameworks/base/services/core/java/com/android/server/display/ |
H A D | BrightnessUtils.java | 19 import android.util.MathUtils; 52 ret = MathUtils.sq(val / R); in convertGammaToLinear() 54 ret = MathUtils.exp((val - C) / A) + B; in convertGammaToLinear() 59 final float normalizedRet = MathUtils.constrain(ret, 0, 12); in convertGammaToLinear() 77 ret = MathUtils.sqrt(normalizedVal) * R; in convertLinearToGamma() 79 ret = A * MathUtils.log(normalizedVal - B) + C; in convertLinearToGamma()
|
H A 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() 477 adjustment = MathUtils.constrain(adjustment, -1, 1); in getAdjustedCurve() 478 float gamma = MathUtils.pow(maxGamma, -adjustment); in getAdjustedCurve() [all …]
|
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/display/ |
H A 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() 545 strategy.addUserDataPoint(x2, (float) MathUtils.pow(y2, gamma)); in testGammaCorrectionHighChangeAtCenter() 546 assertEquals(MathUtils.pow(y1, minGamma), in testGammaCorrectionHighChangeAtCenter() 548 assertEquals(MathUtils.pow(y2, gamma), in testGammaCorrectionHighChangeAtCenter() 550 assertEquals(MathUtils.pow(y3, minGamma), in testGammaCorrectionHighChangeAtCenter() 590 float gamma = (float) MathUtils.pow(MAXIMUM_GAMMA, -adjustment); in testGammaCorrectionChangeAtEdges() [all …]
|
/aosp12/frameworks/base/packages/SystemUI/animation/src/com/android/systemui/animation/ |
H A D | LaunchAnimator.kt | 27 import android.util.MathUtils 56 return MathUtils.constrain( 296 val xCenter = MathUtils.lerp(startCenterX, endCenterX, xProgress) 297 val halfWidth = MathUtils.lerp(startWidth, endWidth, progress) / 2f 299 state.top = MathUtils.lerp(startTop, endTop, progress).roundToInt() 300 state.bottom = MathUtils.lerp(startBottom, endBottom, progress).roundToInt() 305 MathUtils.lerp(startTopCornerRadius, endTopCornerRadius, progress) 307 MathUtils.lerp(startBottomCornerRadius, endBottomCornerRadius, progress)
|
H A D | ShadeInterpolation.kt | 3 import android.util.MathUtils 13 val mappedFraction = MathUtils.constrainedMap(0f, 1f, 0f, 0.5f, fraction) 23 val mappedFraction = MathUtils.constrainedMap(0f, 1f, 0.3f, 1f, fraction)
|
H A D | Interpolators.java | 20 import android.util.MathUtils; 185 float b = MathUtils.log((overshootAmount + 1) / (overshootAmount)) / overshootStart; in getOvershootInterpolation() 186 return MathUtils.max(0.0f, in getOvershootInterpolation() 197 return MathUtils.max(0.0f, (float) (1.0f - Math.exp(-4 * progress))); in getOvershootInterpolation()
|
/aosp12/frameworks/base/libs/hwui/ |
H A 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()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
H A D | KeyguardClockPositionAlgorithm.java | 24 import android.util.MathUtils; 251 float clockY = MathUtils.lerp(clockYBouncer, clockYRegular, shadeExpansion); in getClockY() 286 return (int) (MathUtils.lerp(clockY, clockYDark, darkAmount) + mOverStretchAmount); in getClockY() 295 float userSwitchY = MathUtils.lerp(userSwitchYBouncer, userSwitchYRegular, shadeExpansion); in getUserSwitcherY() 310 float qsAlphaFactor = MathUtils.saturate(mQsExpansion / 0.3f); in getClockAlpha() 314 return MathUtils.lerp(alphaKeyguard, 1f, mDarkAmount); in getClockAlpha()
|
/aosp12/frameworks/base/libs/hwui/pipeline/skia/ |
H A 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()
|
/aosp12/frameworks/base/core/java/android/hardware/display/ |
H A 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()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/keyguard/clock/ |
H A 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()
|
H A D | SmallClockPosition.java | 20 import android.util.MathUtils; 76 return (int) MathUtils.lerp(lockY, aodY, mDarkAmount); in getPreferredY()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/keyguard/ |
H A D | TextInterpolator.kt | 25 import android.util.MathUtils 216 run.baseX[i] = MathUtils.lerp(run.baseX[i], run.targetX[i], progress) 217 run.baseY[i] = MathUtils.lerp(run.baseY[i], run.targetY[i], progress) 338 MathUtils.lerp(line.baseX[i], line.targetX[i], progress) 340 MathUtils.lerp(line.baseY[i], line.targetY[i], progress) 415 out.textSize = MathUtils.lerp(from.textSize, to.textSize, progress)
|
H A D | FontInterpolator.kt | 21 import android.util.MathUtils 122 MathUtils.lerp( 127 MathUtils.lerp( 135 MathUtils.lerp(startValue, endValue, progress)
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/ |
H A 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()
|
/aosp12/frameworks/base/services/accessibility/java/com/android/server/accessibility/gestures/ |
H A 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()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
H A D | BlurUtils.kt | 25 import android.util.MathUtils 61 return MathUtils.lerp(minBlurRadius.toFloat(), maxBlurRadius.toFloat(), ratio) 71 return MathUtils.map(minBlurRadius.toFloat(), maxBlurRadius.toFloat(),
|
H A D | NotificationShadeDepthController.kt | 26 import android.util.MathUtils 182 val animationRadius = MathUtils.constrain(shadeAnimation.radius, 199 var zoomOut = MathUtils.saturate(blurUtils.ratioOfBlurRadius(shadeRadius)) 316 val expansion = MathUtils.saturate( 328 deltaTime = MathUtils.constrain( 334 val shadeVelocity = MathUtils.constrain(
|
/aosp12/frameworks/base/core/java/com/android/internal/graphics/cam/ |
H A 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()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/util/ |
H A D | BurnInHelper.kt | 19 import android.util.MathUtils 69 return MathUtils.lerp(0f, amplitude, interpolationAmount)
|
/aosp12/frameworks/base/core/java/android/os/ |
H A 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()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/charging/ |
H A D | DwellRippleShader.kt | 22 import android.util.MathUtils 112 setUniform("in_blur", MathUtils.lerp(1f, 0.7f, value))
|
/aosp12/packages/apps/Settings/src/com/android/settings/deviceinfo/ |
H A D | StorageSummaryPreference.java | 21 import android.util.MathUtils; 42 mPercent = MathUtils.constrain((int) ((usedBytes * 100) / totalBytes), in setPercent()
|