/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/ |
D | BrightnessUtils.java | 19 import android.util.MathUtils; 54 final float normalizedVal = MathUtils.norm(0, GAMMA_SPACE_MAX, val); in convertGammaToLinear() 57 ret = MathUtils.sq(normalizedVal / R); in convertGammaToLinear() 59 ret = MathUtils.exp((normalizedVal - C) / A) + B; in convertGammaToLinear() 64 return Math.round(MathUtils.lerp(min, max, ret / 12)); in convertGammaToLinear() 91 final float normalizedVal = MathUtils.norm(min, max, val) * 12; in convertLinearToGamma() 94 ret = MathUtils.sqrt(normalizedVal) * R; in convertLinearToGamma() 96 ret = A * MathUtils.log(normalizedVal - B) + C; in convertLinearToGamma() 99 return Math.round(MathUtils.lerp(0, GAMMA_SPACE_MAX, ret)); in convertLinearToGamma()
|
D | DisplayDensityUtils.java | 26 import android.util.MathUtils; 110 final int numLarger = (int) MathUtils.constrain((maxScale - 1) / MIN_SCALE_INTERVAL, in DisplayDensityUtils() 112 final int numSmaller = (int) MathUtils.constrain((1 - minScale) / MIN_SCALE_INTERVAL, in DisplayDensityUtils()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | KeyguardClockPositionAlgorithm.java | 23 import android.util.MathUtils; 202 clockYDark = MathUtils.max(0, clockYDark); in getClockY() 209 float clockY = MathUtils.lerp(clockYBouncer, clockYRegular, shadeExpansion); in getClockY() 210 clockYDark = MathUtils.lerp(clockYBouncer, clockYDark, shadeExpansion); in getClockY() 212 return (int) (MathUtils.lerp(clockY, clockYDark, mDarkAmount) + mEmptyDragAmount); in getClockY() 226 return MathUtils.lerp(alphaKeyguard, 1f, mDarkAmount); in getClockAlpha()
|
D | NavigationBarEdgePanel.java | 29 import android.util.MathUtils; 515 float extent = MathUtils.lerp(1.0f, 0.75f, mDisappearAmount); in calculatePath() 601 float touchTranslation = MathUtils.abs(x - mStartX); in handleMoveEvent() 629 float progress = MathUtils.saturate(diff / (mScreenSize - mBaseTranslation)); in handleMoveEvent() 635 float progress = MathUtils.saturate(diff / mBaseTranslation); in handleMoveEvent() 652 float velocity = MathUtils.mag(xVelocity, yVelocity); in handleMoveEvent() 677 float progress = MathUtils.constrain( in handleMoveEvent()
|
D | LightBarTransitionsController.java | 24 import android.util.MathUtils; 199 mApplier.applyDarkIntensity(MathUtils.lerp(mDarkIntensity, 0f, mDozeAmount)); in dispatchDark()
|
/frameworks/base/services/core/java/com/android/server/display/ |
D | BrightnessMappingStrategy.java | 26 import android.util.MathUtils; 280 brightness = MathUtils.constrain(brightness, in normalizeAbsoluteBrightness() 338 float newBrightness = MathUtils.constrain( in smoothCurve() 354 float newBrightness = MathUtils.constrain( in smoothCurve() 369 return MathUtils.exp(MAX_GRAD in permissibleRatio() 370 * (MathUtils.log(currLux + LUX_GRAD_SMOOTHING) in permissibleRatio() 371 - MathUtils.log(prevLux + LUX_GRAD_SMOOTHING))); in permissibleRatio() 390 gamma = MathUtils.log(desiredBrightness) / MathUtils.log(currentBrightness); in inferAutoBrightnessAdjustment() 392 adjustment = -MathUtils.log(gamma) / MathUtils.log(maxGamma); in inferAutoBrightnessAdjustment() 394 adjustment = MathUtils.constrain(adjustment, -1, +1); in inferAutoBrightnessAdjustment() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/display/ |
D | BrightnessMappingStrategyTest.java | 33 import android.util.MathUtils; 366 minBrightness = (float) MathUtils.pow(minBrightness, MAXIMUM_GAMMA); // Gamma correction. in assertStrategyAdaptsToUserDataPoints() 475 strategy.addUserDataPoint(x2, (float) MathUtils.pow(y2, gamma)); in testGammaCorrectionLowChangeAtCenter() 476 assertEquals(MathUtils.pow(y1, gamma), strategy.getBrightness(x1), 0.01f /* tolerance */); in testGammaCorrectionLowChangeAtCenter() 477 assertEquals(MathUtils.pow(y2, gamma), strategy.getBrightness(x2), 0.01f /* tolerance */); in testGammaCorrectionLowChangeAtCenter() 478 assertEquals(MathUtils.pow(y3, gamma), strategy.getBrightness(x3), 0.01f /* tolerance */); in testGammaCorrectionLowChangeAtCenter() 504 strategy.addUserDataPoint(x2, (float) MathUtils.pow(y2, gamma)); in testGammaCorrectionHighChangeAtCenter() 505 assertEquals(MathUtils.pow(y1, minGamma), strategy.getBrightness(x1), in testGammaCorrectionHighChangeAtCenter() 507 assertEquals(MathUtils.pow(y2, gamma), strategy.getBrightness(x2), in testGammaCorrectionHighChangeAtCenter() 509 assertEquals(MathUtils.pow(y3, minGamma), strategy.getBrightness(x3), in testGammaCorrectionHighChangeAtCenter() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
D | ActivityLaunchAnimator.java | 26 import android.util.MathUtils; 197 int newWidth = (int) MathUtils.lerp(notificationWidth, in onAnimationStart() 201 mParams.top = (int) MathUtils.lerp(mParams.startPosition[1], in onAnimationStart() 203 mParams.bottom = (int) MathUtils.lerp(mParams.startPosition[1] in onAnimationStart() 207 mCornerRadius = MathUtils.lerp(mNotificationCornerRadius, in onAnimationStart() 321 clipTopAmountCompensation = (int) MathUtils.lerp(0, startClipTopAmount, in getTopChange() 332 return MathUtils.constrain((linearProgress * ANIMATION_DURATION - delay) in getProgress()
|
/frameworks/base/libs/hwui/pipeline/skia/ |
D | LayerDrawable.cpp | 40 return MathUtils::isOne(matrix.getScaleX()) && MathUtils::isOne(matrix.getScaleY()); in isBasicallyTranslate() 47 bool noScale = MathUtils::isOne(matrix.getScaleX()) && MathUtils::isOne(matrix.getScaleY()); in shouldFilter()
|
/frameworks/base/core/java/android/hardware/display/ |
D | BrightnessCorrection.java | 25 import android.util.MathUtils; 225 mScale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE); in ScaleAndTranslateLog() 226 mTranslate = MathUtils.constrain(translate, MIN_TRANSLATE, MAX_TRANSLATE); in ScaleAndTranslateLog() 231 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; 73 return (int) MathUtils.lerp(lockY, aodY, mDarkAmount); in getPreferredY()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/util/ |
D | BurnInHelper.kt | 19 import android.util.MathUtils 50 return MathUtils.lerp(0f, amplitude, interpolationAmount) in zigzag()
|
/frameworks/base/core/java/android/os/ |
D | ParcelableParcel.java | 20 import android.util.MathUtils; 45 src.setDataPosition(MathUtils.addOrThrow(pos, size)); in ParcelableParcel()
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/ |
D | GestureUtils.java | 3 import android.util.MathUtils; 35 return MathUtils.dist(first.getX(), first.getY(), second.getX(), second.getY()); in distance()
|
/frameworks/base/libs/hwui/ |
D | Outline.h | 53 if (MathUtils::isPositive(radius)) { in setRoundRect() 98 return willClip() && MathUtils::isPositive(mRadius); in willRoundRectClip()
|
D | RenderProperties.cpp | 130 if (mPrimitiveFields.mAlpha < 1 && !MathUtils::isZero(mPrimitiveFields.mAlpha)) { in debugOutputProperties() 191 if (MathUtils::isZero(getRotationX()) && MathUtils::isZero(getRotationY())) { in updateMatrix()
|
/frameworks/base/libs/hwui/tests/common/ |
D | TestUtils.h | 39 EXPECT_TRUE(MathUtils::areEqual((a).left, (b).left) && \ 40 MathUtils::areEqual((a).top, (b).top) && \ 41 MathUtils::areEqual((a).right, (b).right) && \ 42 MathUtils::areEqual((a).bottom, (b).bottom)); 137 if (!MathUtils::areEqual(a[i], b[i])) { in matricesAreApproxEqual()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | MediaArtworkProcessor.kt | 28 import android.util.MathUtils 53 MathUtils.fitRect(rect, Math.max(mTmpSize.x / DOWNSAMPLE, mTmpSize.y / DOWNSAMPLE)) in processArtwork()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/ |
D | TouchAnimator.java | 18 import android.util.MathUtils; 56 float t = MathUtils.constrain((fraction - mStartDelay) / mSpan, 0, 1); in setPosition() 212 int i = MathUtils.constrain((int) Math.ceil(fraction / mFrameWidth), 1, mSize - 1); in setValue()
|
/frameworks/layoutlib/bridge/src/com/android/internal/view/animation/ |
D | NativeInterpolatorFactoryHelper_Delegate.java | 23 import android.util.MathUtils; 132 return MathUtils.lerp(mValues[i1], mValues[i2], weight); in getInterpolation()
|
/frameworks/base/core/java/com/android/internal/util/ |
D | ProgressReporter.java | 25 import android.util.MathUtils; 147 + MathUtils.constrain((n * mSegmentRange[1]) / m, 0, mSegmentRange[1]); in setProgress()
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
D | RippleForeground.java | 29 import android.util.MathUtils; 316 return MathUtils.lerp(mClampedStartingX - mBounds.exactCenterX(), mTargetX, mTweenX); in getCurrentX() 320 return MathUtils.lerp(mClampedStartingY - mBounds.exactCenterY(), mTargetY, mTweenY); in getCurrentY() 324 return MathUtils.lerp(mStartRadius, mTargetRadius, mTweenRadius); in getCurrentRadius()
|
/frameworks/base/core/java/android/widget/ |
D | TextInputTimePickerView.java | 26 import android.util.MathUtils; 236 MathUtils.constrain(hour, minHour, maxHour))); in parseAndSetHourInternal() 252 mListener.onValueChanged(MINUTES, MathUtils.constrain(minutes, 0, 59)); in parseAndSetMinuteInternal()
|
/frameworks/base/libs/hwui/utils/ |
D | MathUtils.h | 28 class MathUtils {
|