Home
last modified time | relevance | path

Searched refs:constrain (Results 1 – 25 of 44) sorted by relevance

12

/frameworks/support/v4/java/android/support/v4/widget/
DAutoScrollHelper.java556 return constrain(value * targetVelocity, minimumVelocity, maximumVelocity); in computeTargetVelocity()
558 return -constrain(-value * targetVelocity, minimumVelocity, maximumVelocity); in computeTargetVelocity()
607 final float edgeSize = constrain(relativeValue * size, NO_MIN, maxValue); in getEdgeValue()
620 return constrain(interpolated, -1, 1); in getEdgeValue()
652 private static int constrain(int value, int min, int max) { in constrain() method in AutoScrollHelper
662 private static float constrain(float value, float min, float max) { in constrain() method in AutoScrollHelper
776 mEffectiveRampDown = constrain((int) (currentTime - mStartTime), 0, mRampDownDuration); in requestStop()
791 return 0.5f * constrain(elapsedSinceStart / (float) mRampUpDuration, 0, 1); in getValueAt()
795 * constrain(elapsedSinceEnd / (float) mEffectiveRampDown, 0, 1); in getValueAt()
/frameworks/base/core/java/com/android/internal/widget/
DAutoScrollHelper.java555 return constrain(value * targetVelocity, minimumVelocity, maximumVelocity); in computeTargetVelocity()
557 return -constrain(-value * targetVelocity, minimumVelocity, maximumVelocity); in computeTargetVelocity()
606 final float edgeSize = constrain(relativeValue * size, NO_MIN, maxValue); in getEdgeValue()
619 return constrain(interpolated, -1, 1); in getEdgeValue()
651 private static int constrain(int value, int min, int max) { in constrain() method in AutoScrollHelper
661 private static float constrain(float value, float min, float max) { in constrain() method in AutoScrollHelper
775 mEffectiveRampDown = constrain((int) (currentTime - mStartTime), 0, mRampDownDuration); in requestStop()
790 return 0.5f * constrain(elapsedSinceStart / (float) mRampUpDuration, 0, 1); in getValueAt()
794 * constrain(elapsedSinceEnd / (float) mEffectiveRampDown, 0, 1); in getValueAt()
/frameworks/support/v4/java/android/support/v4/graphics/
DColorUtils.java204 outHsl[0] = constrain(h, 0f, 360f); in RGBToHSL()
205 outHsl[1] = constrain(s, 0f, 1f); in RGBToHSL()
206 outHsl[2] = constrain(l, 0f, 1f); in RGBToHSL()
284 r = constrain(r, 0, 255); in HSLToColor()
285 g = constrain(g, 0, 255); in HSLToColor()
286 b = constrain(b, 0, 255); in HSLToColor()
485 constrain((int) Math.round(r * 255), 0, 255), in XYZToColor()
486 constrain((int) Math.round(g * 255), 0, 255), in XYZToColor()
487 constrain((int) Math.round(b * 255), 0, 255)); in XYZToColor()
516 private static float constrain(float amount, float low, float high) { in constrain() method in ColorUtils
[all …]
/frameworks/support/design/base/android/support/design/widget/
DMathUtils.java21 static int constrain(int amount, int low, int high) { in constrain() method in MathUtils
25 static float constrain(float amount, float low, float high) { in constrain() method in MathUtils
/frameworks/base/core/java/android/util/
DMathUtils.java38 public static int constrain(int amount, int low, int high) { in constrain() method in MathUtils
42 public static long constrain(long amount, long low, long high) { in constrain() method in MathUtils
46 public static float constrain(float amount, float low, float high) { in constrain() method in MathUtils
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DMagnificationController.java407 scale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE); in setScale()
500 currSpec.offsetX = MathUtils.constrain(nonNormOffsetX, getMinOffsetXLocked(), 0); in offsetMagnifiedRegionCenter()
502 currSpec.offsetY = MathUtils.constrain(nonNormOffsetY, getMinOffsetYLocked(), 0); in offsetMagnifiedRegionCenter()
590 final float normScale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE); in updateMagnificationSpecLocked()
598 final float offsetX = MathUtils.constrain(nonNormOffsetX, getMinOffsetXLocked(), 0); in updateMagnificationSpecLocked()
606 final float offsetY = MathUtils.constrain(nonNormOffsetY, getMinOffsetYLocked(), 0); in updateMagnificationSpecLocked()
DMagnificationGestureHandler.java730 final float scale = MathUtils.constrain(targetScale, MIN_SCALE, MAX_SCALE); in onActionTap()
747 final float scale = MathUtils.constrain(targetScale, MIN_SCALE, MAX_SCALE); in onActionTapAndHold()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/
DDisplayDensityUtils.java107 final int numLarger = (int) MathUtils.constrain((maxScale - 1) / MIN_SCALE_INTERVAL, in DisplayDensityUtils()
109 final int numSmaller = (int) MathUtils.constrain((1 - minScale) / MIN_SCALE_INTERVAL, in DisplayDensityUtils()
/frameworks/base/core/java/com/android/internal/util/
DNotificationColorUtil.java605 constrain((int) Math.round(r * 255), 0, 255), in XYZToColor()
606 constrain((int) Math.round(g * 255), 0, 255), in XYZToColor()
607 constrain((int) Math.round(b * 255), 0, 255)); in XYZToColor()
627 private static int constrain(int amount, int low, int high) { in constrain() method in NotificationColorUtil.ColorUtilsFromCompat
DProgressReporter.java147 + MathUtils.constrain((n * mSegmentRange[1]) / m, 0, mSegmentRange[1]); in setProgress()
/frameworks/support/design/eclair-mr1/android/support/design/widget/
DValueAnimatorCompatImplEclairMr1.java163 final float linearFraction = MathUtils.constrain(elapsed / (float) mDuration, 0f, 1f); in update()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
DQSTileView.java71 float largeFactor = (MathUtils.constrain(getResources().getConfiguration().fontScale, in updateTopPadding()
DTouchAnimator.java56 float t = MathUtils.constrain((fraction - mStartDelay) / mSpan, 0, 1); in setPosition()
/frameworks/base/core/java/android/widget/
DSimpleMonthView.java535 row = MathUtils.constrain(row, 0, maxRows); in findClosestRow()
550 MathUtils.constrain(centerX / mCellWidth, 0, DAYS_IN_WEEK - 1); in findClosestColumn()
821 mEnabledDayStart = MathUtils.constrain(enabledDayStart, 1, mDaysInMonth); in setMonthParams()
822 mEnabledDayEnd = MathUtils.constrain(enabledDayEnd, mEnabledDayStart, mDaysInMonth); in setMonthParams()
DDayPickerView.java162 final long setDateMillis = MathUtils.constrain( in DayPickerView()
368 return MathUtils.constrain(diffMonth, 0, diffMonthMax);
DFastScroller.java996 final int exactSection = MathUtils.constrain( in scrollTo()
1064 targetIndex = MathUtils.constrain(targetIndex, 0, count - 1); in scrollTo()
1077 final int index = MathUtils.constrain((int) (position * count), 0, count - 1); in scrollTo()
1221 final float previewMiddle = MathUtils.constrain(previewPos, minP, maxP); in setThumbPos()
1236 return MathUtils.constrain((y - mThumbOffset) / mThumbRange, 0f, 1f); in getPosFromMotionEvent()
/frameworks/support/design/src/android/support/design/widget/
DHeaderScrollingViewBehavior.java147 : MathUtils.constrain(Math.round(getOverlapRatioForOffset(header) * mOverlayTop), in getOverlapPixelsForOffset()
DHeaderBehavior.java207 newOffset = MathUtils.constrain(newOffset, minOffset, maxOffset); in setHeaderTopBottomOffset()
DAppBarLayout.java988 MathUtils.constrain(newOffset, -abl.getTotalScrollRange(), 0), 0); in snapToChildIfNeeded()
1058 MathUtils.constrain(getTopAndBottomOffset(), -abl.getTotalScrollRange(), 0));
1110 newOffset = MathUtils.constrain(newOffset, minOffset, maxOffset); in setHeaderTopBottomOffset()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DDozeParameters.java139 return MathUtils.constrain(value, 0, MAX_DURATION); in getInt()
/frameworks/base/services/core/java/com/android/server/display/
DDisplayPowerController.java827 return MathUtils.constrain(
1213 return MathUtils.constrain(value, PowerManager.BRIGHTNESS_OFF, PowerManager.BRIGHTNESS_ON); in clampAbsoluteBrightness()
/frameworks/base/core/java/android/net/
DNetworkStatsHistory.java249 return MathUtils.constrain(index, 0, bucketCount - 1); in getIndexBefore()
263 return MathUtils.constrain(index, 0, bucketCount - 1); in getIndexAfter()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DNetworkControllerImpl.java743 int num = MathUtils.constrain(Integer.parseInt(sims), 1, 8); in dispatchDemoCommand()
765 slot = MathUtils.constrain(slot, 0, 8); in dispatchDemoCommand()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkStatsRecorder.java132 mPersistThresholdBytes = MathUtils.constrain( in setPersistThreshold()
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
DSwitchCompat.java943 final float newPos = constrain(mThumbPosition + dPos, 0, 1); in onTouchEvent()
1424 private static float constrain(float amount, float low, float high) { in constrain() method in SwitchCompat

12