Home
last modified time | relevance | path

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

123

/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DPathDestructionActivity.java25 import android.util.MathUtils;
60 left = MathUtils.random(getWidth() - MIN_SIZE); in getRandomPath()
61 top = MathUtils.random(getHeight() - MIN_SIZE); in getRandomPath()
62 right = left + MathUtils.random(getWidth() - left); in getRandomPath()
63 bottom = top + MathUtils.random(getHeight() - top); in getRandomPath()
74 int red = MathUtils.random(255); in getRandomColor()
75 int green = MathUtils.random(255); in getRandomColor()
76 int blue = MathUtils.random(255); in getRandomColor()
/frameworks/base/graphics/java/android/graphics/
DColor.java21 import android.util.MathUtils;
269 h = MathUtils.constrain(h, 0.0f, 1.0f); in HSBtoColor()
270 s = MathUtils.constrain(s, 0.0f, 1.0f); in HSBtoColor()
271 b = MathUtils.constrain(b, 0.0f, 1.0f); in HSBtoColor()
/frameworks/base/libs/hwui/
DPatch.cpp194 x1 = MathUtils::max(x1, 0.0f); in generateQuad()
195 x2 = MathUtils::max(x2, 0.0f); in generateQuad()
196 y1 = MathUtils::max(y1, 0.0f); in generateQuad()
197 y2 = MathUtils::max(y2, 0.0f); in generateQuad()
DRenderProperties.cpp150 && !MathUtils::isZero(mPrimitiveFields.mAlpha)) { in debugOutputProperties()
194 if (MathUtils::isZero(getRotationX()) && MathUtils::isZero(getRotationY())) { in updateMatrix()
DInterpolator.cpp109 int i2 = MathUtils::min(i1 + 1, (int) mSize - 1); in interpolate()
118 return MathUtils::lerp(v1, v2, weight); in interpolate()
DVertexBuffer.h132 mIndexCount = MathUtils::min(newCount, mAllocatedIndexCount); in updateIndexCount()
135 mVertexCount = MathUtils::min(newCount, mAllocatedVertexCount); in updateVertexCount()
DPathTessellator.h41 , thresholdForConicQuads(pixelThreshold * MathUtils::min(invScaleX, invScaleY) / 2.0f) { in PathApproximationInfo()
DOutline.h91 return willClip() && MathUtils::isPositive(mRadius); in willRoundRectClip()
DDisplayListCanvas.cpp259 && MathUtils::isPositive(matrix.getScaleX()) in drawBitmap()
260 && MathUtils::isPositive(matrix.getScaleY())) { in drawBitmap()
295 if (!MathUtils::areEqual(scaleX, 1.0f) || !MathUtils::areEqual(scaleY, 1.0f)) { in drawBitmap()
DFontRenderer.cpp121 mSmallCacheWidth = MathUtils::min(mSmallCacheWidth, maxTextureSize); in FontRenderer()
122 mSmallCacheHeight = MathUtils::min(mSmallCacheHeight, maxTextureSize); in FontRenderer()
123 mLargeCacheWidth = MathUtils::min(mLargeCacheWidth, maxTextureSize); in FontRenderer()
124 mLargeCacheHeight = MathUtils::min(mLargeCacheHeight, maxTextureSize); in FontRenderer()
DShadowTessellator.cpp177 dotProduct = MathUtils::clamp(dotProduct, -1.0f, 1.0f); in getExtraVertexNumber()
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DGestureUtils.java3 import android.util.MathUtils;
39 return MathUtils.dist(first.getX(pointerIndex), first.getY(pointerIndex), in computeDistance()
/frameworks/base/services/core/java/com/android/server/display/
DAutomaticBrightnessController.java36 import android.util.MathUtils;
473 final float adjGamma = MathUtils.pow(SCREEN_AUTO_BRIGHTNESS_ADJUSTMENT_MAX_GAMMA, in updateAutoBrightness()
499 value = MathUtils.pow(value, gamma); in updateAutoBrightness()
524 return MathUtils.constrain(value, in clampScreenBrightness()
583 return MathUtils.lerp(1.0f, TWILIGHT_ADJUSTMENT_MAX_GAMMA, in getTwilightGamma()
588 return MathUtils.lerp(1.0f, TWILIGHT_ADJUSTMENT_MAX_GAMMA, in getTwilightGamma()
/frameworks/base/graphics/java/android/graphics/drawable/
DRippleForeground.java29 import android.util.MathUtils;
197 return MathUtils.lerp(mClampedStartingX - mBounds.exactCenterX(), mTargetX, mTweenX); in getCurrentX()
201 return MathUtils.lerp(mClampedStartingY - mBounds.exactCenterY(), mTargetY, mTweenY); in getCurrentY()
211 return MathUtils.lerp(0, mTargetRadius, mTweenRadius); in getCurrentRadius()
DRotateDrawable.java29 import android.util.MathUtils;
310 final float degrees = MathUtils.lerp(mState.mFromDegrees, mState.mToDegrees, value); in onLevelChange()
/frameworks/support/design/base/android/support/design/widget/
DMathUtils.java19 class MathUtils { class
/frameworks/base/services/core/java/com/android/server/policy/
DEnableAccessibilityController.java35 import android.util.MathUtils;
186 final float firstPointerMove = MathUtils.dist(event.getX(0), in onTouchEvent()
191 final float secondPointerMove = MathUtils.dist(event.getX(1), in onTouchEvent()
/frameworks/base/core/java/android/util/
DMathUtils.java26 public final class MathUtils { class
31 private MathUtils() { in MathUtils() method in MathUtils
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DDozeParameters.java23 import android.util.MathUtils;
147 return MathUtils.constrain(value, 0, MAX_DURATION); in getInt()
/frameworks/base/libs/hwui/utils/
DMathUtils.h27 class MathUtils {
DBlur.cpp44 if (MathUtils::areEqual(radiusCeil, radius)) { in convertRadiusToInt()
/frameworks/base/core/java/android/widget/
DDayPickerView.java28 import android.util.MathUtils;
162 final long setDateMillis = MathUtils.constrain( in DayPickerView()
368 return MathUtils.constrain(diffMonth, 0, diffMonthMax);
DFastScroller.java36 import android.util.MathUtils;
995 final int exactSection = MathUtils.constrain( in scrollTo()
1063 targetIndex = MathUtils.constrain(targetIndex, 0, count - 1); in scrollTo()
1076 final int index = MathUtils.constrain((int) (position * count), 0, count - 1); in scrollTo()
1220 final float previewMiddle = MathUtils.constrain(previewPos, minP, maxP); in setThumbPos()
1235 return MathUtils.constrain((y - mThumbOffset) / mThumbRange, 0f, 1f); in getPosFromMotionEvent()
/frameworks/base/libs/hwui/thread/
DTaskManager.cpp36 int workerCount = MathUtils::max(1, cpuCount / 2); in TaskManager()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkStatsRecorder.java31 import android.util.MathUtils;
107 mPersistThresholdBytes = MathUtils.constrain( in setPersistThreshold()

123