Home
last modified time | relevance | path

Searched refs:MathUtils (Results 1 – 10 of 10) sorted by relevance

/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/util/
DMathUtilsTest.java28 assertEquals(10L, MathUtils.extractValidNumberInRange(9L, 10L, 20L)); in extractValidNumberInRange_success()
29 assertEquals(10L, MathUtils.extractValidNumberInRange(10L, 10L, 20L)); in extractValidNumberInRange_success()
30 assertEquals(20L, MathUtils.extractValidNumberInRange(20L, 10L, 20L)); in extractValidNumberInRange_success()
31 assertEquals(20L, MathUtils.extractValidNumberInRange(21L, 10L, 20L)); in extractValidNumberInRange_success()
32 assertEquals(15L, MathUtils.extractValidNumberInRange(15L, 10L, 20L)); in extractValidNumberInRange_success()
35 assertEquals(new UnsignedLong("10"), MathUtils.extractValidNumberInRange( in extractValidNumberInRange_success()
37 assertEquals(new UnsignedLong("10"), MathUtils.extractValidNumberInRange( in extractValidNumberInRange_success()
40 assertEquals(new UnsignedLong("20"), MathUtils.extractValidNumberInRange( in extractValidNumberInRange_success()
42 assertEquals(new UnsignedLong("20"), MathUtils.extractValidNumberInRange( in extractValidNumberInRange_success()
53 assertEquals(twoToThe64Minus5, MathUtils.extractValidNumberInRange( in extractValidNumberInRange_success()
[all …]
/packages/services/Car/service/src/com/android/car/util/
DBrightnessUtils.java67 final float normalizedVal = MathUtils.norm(GAMMA_SPACE_MIN, GAMMA_SPACE_MAX, val); in convertGammaToLinear()
70 ret = MathUtils.sq(normalizedVal / R); in convertGammaToLinear()
72 ret = MathUtils.exp((normalizedVal - C) / A) + B; in convertGammaToLinear()
77 return Math.round(MathUtils.lerp(min, max, ret / 12)); in convertGammaToLinear()
116 final float normalizedVal = MathUtils.norm(min, max, val) * 12; in convertLinearToGammaFloat()
119 ret = MathUtils.sqrt(normalizedVal) * R; in convertLinearToGammaFloat()
121 ret = A * MathUtils.log(normalizedVal - B) + C; in convertLinearToGammaFloat()
124 return Math.round(MathUtils.lerp(GAMMA_SPACE_MIN, GAMMA_SPACE_MAX, ret)); in convertLinearToGammaFloat()
143 return MathUtils.constrainedMap(minFloat, maxFloat, minInt, maxInt, brightnessInt); in brightnessIntToFloat()
176 return MathUtils.constrainedMap(minInt, maxInt, minFloat, maxFloat, brightnessFloat); in brightnessFloatToIntRange()
[all …]
/packages/apps/TvSystemUI/src/com/android/systemui/tv/privacy/
DPrivacyChipDrawable.java32 import android.util.MathUtils;
129 float radius = MathUtils.lerp( in draw()
159 float left = MathUtils.lerp(start.left, stop.left, amount); in lerpRect()
160 float top = MathUtils.lerp(start.top, stop.top, amount); in lerpRect()
161 float right = MathUtils.lerp(start.right, stop.right, amount); in lerpRect()
162 float bottom = MathUtils.lerp(start.bottom, stop.bottom, amount); in lerpRect()
172 float radius = MathUtils.lerp( in clipToForeground()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/
DEdgeBackGesturePanel.java37 import androidx.core.math.MathUtils;
554 float progress = MathUtils.clamp(diff / (mScreenSize - mBaseTranslation), 0, 1); in handleMoveEvent()
560 float progress = MathUtils.clamp(diff / mBaseTranslation, 0, 1); in handleMoveEvent()
603 MathUtils.clamp(Math.abs(yOffset) / (maxYOffset * RUBBER_BAND_AMOUNT), 0, 1); in handleMoveEvent()
614 setY(MathUtils.clamp((int) positionY, 0, mDisplaySize.y)); in updatePosition()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/
DAttributionConfig.java38 import com.android.adservices.service.measurement.util.MathUtils;
286 MathUtils.extractValidNumberInRange( in Builder()
297 MathUtils.extractValidNumberInRange( in Builder()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DLauncherUnfoldAnimationController.java25 import android.util.MathUtils;
240 setScale(MathUtils.constrainedMap(SCALE_LAUNCHER_FROM, 1, 0, 1, progress)); in onTransitionProgress()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/util/
DMathUtils.java20 public class MathUtils { class
/packages/apps/Settings/src/com/android/settings/widget/
DChartSweepView.java34 import android.util.MathUtils;
495 final float clampedTargetY = MathUtils.constrain( in onTouchEvent()
504 final float clampedTargetX = MathUtils.constrain( in onTouchEvent()
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadThread.java76 import android.util.MathUtils;
812 retryAfter = MathUtils.constrain(retryAfter, Constants.MIN_RETRY_AFTER, in parseUnavailableHeaders()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/registration/
DAsyncSourceFetcher.java19 import static com.android.adservices.service.measurement.util.MathUtils.extractValidNumberInRange;