Home
last modified time | relevance | path

Searched refs:FloatMath (Results 1 – 25 of 33) sorted by relevance

12

/frameworks/base/core/tests/coretests/src/android/util/
DFloatMathTest.java26 assertEquals(7, FloatMath.sqrt(49), 0); in testSqrt()
27 assertEquals(10, FloatMath.sqrt(100), 0); in testSqrt()
28 assertEquals(0, FloatMath.sqrt(0), 0); in testSqrt()
29 assertEquals(1, FloatMath.sqrt(1), 0); in testSqrt()
34 assertEquals(78, FloatMath.floor(78.89f), 0); in testFloor()
35 assertEquals(-79, FloatMath.floor(-78.89f), 0); in testFloor()
40 assertEquals(79, FloatMath.ceil(78.89f), 0); in testCeil()
41 assertEquals(-78, FloatMath.ceil(-78.89f), 0); in testCeil()
46 assertEquals(0.0, FloatMath.sin(0), 0); in testSin()
47 assertEquals(0.8414709848078965f, FloatMath.sin(1), 0); in testSin()
[all …]
/frameworks/base/services/core/java/com/android/server/
DTwilightCalculator.java20 import android.util.FloatMath;
78 final float trueAnomaly = meanAnomaly + C1 * FloatMath.sin(meanAnomaly) + C2 in calculateTwilight()
79 * FloatMath.sin(2 * meanAnomaly) + C3 * FloatMath.sin(3 * meanAnomaly); in calculateTwilight()
87 double solarTransitJ2000 = n + J0 + arcLongitude + 0.0053f * FloatMath.sin(meanAnomaly) in calculateTwilight()
88 + -0.0069f * FloatMath.sin(2 * solarLng); in calculateTwilight()
91 double solarDec = Math.asin(FloatMath.sin(solarLng) * FloatMath.sin(OBLIQUITY)); in calculateTwilight()
95 double cosHourAngle = (FloatMath.sin(ALTIDUTE_CORRECTION_CIVIL_TWILIGHT) - Math.sin(latRad) in calculateTwilight()
/frameworks/base/core/java/com/android/internal/widget/multiwaveview/
DPointCloud.java25 import android.util.FloatMath;
154 float x = r * FloatMath.cos(eta); in makePointCloud()
155 float y = r * FloatMath.sin(eta); in makePointCloud()
171 return FloatMath.sqrt(x*x + y*y); in hypot()
183 float cosf = FloatMath.cos(PI * 0.25f * glowDistance / glowManager.radius); in getAlphaForPoint()
192 float cosf = FloatMath.cos(PI * 0.5f * distanceToWaveRing / waveManager.radius); in getAlphaForPoint()
/frameworks/base/core/java/android/util/
DFloatMath.java28 public class FloatMath { class
31 private FloatMath() {} in FloatMath() method in FloatMath
DSpline.java168 float h = FloatMath.hypot(a, b); in MonotoneCubicSpline()
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/common/
DBitmapUtils.java26 import android.util.FloatMath;
75 (int) FloatMath.ceil(FloatMath.sqrt((float) (w * h) / maxNumOfPixels)); in computeInitialSampleSize()
99 int initialSize = (int) FloatMath.floor(1f / scale); in computeSampleSizeLarger()
110 int initialSize = Math.max(1, (int) FloatMath.ceil(1 / scale)); in computeSampleSize()
/frameworks/base/graphics/java/android/graphics/
DColorMatrix.java19 import android.util.FloatMath;
149 float cosine = FloatMath.cos(radians); in setRotate()
150 float sine = FloatMath.sin(radians); in setRotate()
DRectF.java23 import android.util.FloatMath;
453 dst.set((int) FloatMath.floor(left), (int) FloatMath.floor(top), in roundOut()
454 (int) FloatMath.ceil(right), (int) FloatMath.ceil(bottom)); in roundOut()
DPointF.java21 import android.util.FloatMath;
112 return FloatMath.sqrt(x * x + y * y); in length()
/frameworks/base/core/java/android/transition/
DCircularPropagation.java19 import android.util.FloatMath;
105 return FloatMath.sqrt((x * x) + (y * y)); in distance()
DPatternPathMotion.java26 import android.util.FloatMath;
147 return FloatMath.sqrt((x * x) + (y * y)); in distance()
DArcMotion.java24 import android.util.FloatMath;
260 float ratio = FloatMath.sqrt(ratio2); in getPath()
DExplode.java25 import android.util.FloatMath;
172 return FloatMath.sqrt((x * x) + (y * y)); in calculateDistance()
DSidePropagation.java19 import android.util.FloatMath;
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DCropFilter.java23 import android.util.FloatMath;
93 int[] croppedDims = { (int)FloatMath.ceil(mCropRect.xEdge().length() * inDims[0]), in onProcess()
94 (int)FloatMath.ceil(mCropRect.yEdge().length() * inDims[1]) }; in onProcess()
/frameworks/base/services/core/java/com/android/server/display/
DColorFade.java40 import android.util.FloatMath;
376 float cos = FloatMath.cos((float)Math.PI * one_minus_level); in draw()
378 float opacity = -FloatMath.pow(one_minus_level, 2) + 1; in draw()
379 float saturation = FloatMath.pow(level, 4); in draw()
380 float scale = (-FloatMath.pow(one_minus_level, 2) + 1) * 0.1f + 0.9f; in draw()
381 float gamma = (0.5f * sign * FloatMath.pow(cos, 2) + 0.5f) * 0.9f + 0.1f; in draw()
/frameworks/base/policy/src/com/android/internal/policy/impl/
DWindowOrientationListener.java26 import android.util.FloatMath;
449 + ", magnitude=" + FloatMath.sqrt(x * x + y * y + z * z)); in onSensorChanged()
476 + ", magnitude=" + FloatMath.sqrt(x * x + y * y + z * z)); in onSensorChanged()
490 final float magnitude = FloatMath.sqrt(x * x + y * y + z * z); in onSensorChanged()
/frameworks/base/core/java/android/text/
DBoringLayout.java23 import android.util.FloatMath;
210 mMax = (int) FloatMath.ceil(line.metrics(null)); in init()
304 fm.width = (int) FloatMath.ceil(line.metrics(fm)); in isBoring()
/frameworks/base/core/java/android/widget/
DScroller.java22 import android.util.FloatMath;
428 float hyp = FloatMath.sqrt(dx * dx + dy * dy); in fling()
445 float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY); in fling()
DEdgeEffect.java27 import android.util.FloatMath;
224 FloatMath.sqrt(Math.abs(mPullDistance) * mBounds.height()) - 0.3f) / 0.7f; in onPull()
/frameworks/base/packages/WallpaperCropper/src/com/android/wallpapercropper/
DCropView.java24 import android.util.FloatMath;
303 adjustment[1] = FloatMath.ceil(edges.top / scale); in onTouchEvent()
308 if (coef[dim] > 0) adjustment[dim] = FloatMath.ceil(adjustment[dim]); in onTouchEvent()
/frameworks/base/core/java/android/view/
DScaleGestureDetector.java24 import android.util.FloatMath;
397 span = FloatMath.sqrt(spanX * spanX + spanY * spanY);
/frameworks/base/packages/SystemUI/src/com/android/systemui/recent/
DRecentsHorizontalScrollView.java26 import android.util.FloatMath;
371 (int) FloatMath.ceil(dm.widthPixels / (float) child.getMeasuredWidth()); in setAdapter()
DRecentsVerticalScrollView.java26 import android.util.FloatMath;
381 (int) FloatMath.ceil(dm.heightPixels / (float) child.getMeasuredHeight()); in setAdapter()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/camera/
DCameraFunctionalTest.java40 import android.util.FloatMath;

12