/frameworks/base/core/java/android/util/ |
FloatMath.java | 20 * Math routines similar to those found in {@link java.lang.Math}. 23 * {@link java.lang.Math} methods. On versions of Android with a JIT they 25 * {@link java.lang.Math}. {@link java.lang.Math} should be used in 30 * @deprecated Use {@link java.lang.Math} instead. 47 return (float) Math.floor(value); 59 return (float) Math.ceil(value); 70 return (float) Math.sin(angle); 81 return (float) Math.cos(angle) [all...] |
/libcore/luni/src/test/java/libcore/java/lang/ |
OldAndroidMathTest.java | 23 import static java.lang.Math.PI; 27 private static final double HYP = Math.sqrt(2.0); 38 Assert.assertEquals(message, expected, actual, Math.ulp(expected)); 46 Assert.assertEquals(message, expected, actual, Math.ulp(expected)); 53 // Test for method double java.lang.Math.abs(double) 56 (Math.abs(-1908.8976) == 1908.8976)); 58 (Math.abs(1908.8976) == 1908.8976)); 62 // Test for method float java.lang.Math.abs(float) 64 (Math.abs(-1908.8976f) == 1908.8976f)); 66 (Math.abs(1908.8976f) == 1908.8976f)) [all...] |
/frameworks/support/v7/appcompat/src/android/support/v7/app/ |
TwilightCalculator.java | 43 private static final float DEGREES_TO_RADIANS = (float) (Math.PI / 180.0f); 95 final double trueAnomaly = meanAnomaly + C1 * Math.sin(meanAnomaly) + C2 96 * Math.sin(2 * meanAnomaly) + C3 * Math.sin(3 * meanAnomaly); 99 final double solarLng = trueAnomaly + 1.796593063d + Math.PI; 103 float n = Math.round(daysSince2000 - J0 - arcLongitude); 104 double solarTransitJ2000 = n + J0 + arcLongitude + 0.0053d * Math.sin(meanAnomaly) 105 + -0.0069d * Math.sin(2 * solarLng); 108 double solarDec = Math.asin(Math.sin(solarLng) * Math.sin(OBLIQUITY)) [all...] |
/art/test/574-irreducible-and-constant-area/src/ |
Main.java | 31 Math.abs(a); 32 Math.max(a, b); 33 Math.min(a, b); 37 Math.abs(a); 38 Math.max(a, b); 39 Math.min(a, b);
|
/packages/apps/Dialer/java/com/android/incallui/answer/impl/classifier/ |
DirectionEvaluator.java | 21 return Math.abs(yDiff) < Math.abs(xDiff) ? 5.5f : 0.0f;
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
MathTest.java | 22 double HYP = Math.sqrt(2.0); 32 * java.lang.Math#abs(double) 35 // Test for method double java.lang.Math.abs(double) 38 (Math.abs(-1908.8976) == 1908.8976)); 40 (Math.abs(1908.8976) == 1908.8976)); 44 * java.lang.Math#abs(float) 47 // Test for method float java.lang.Math.abs(float) 49 (Math.abs(-1908.8976f) == 1908.8976f)); 51 (Math.abs(1908.8976f) == 1908.8976f)); 55 * java.lang.Math#abs(int [all...] |
/art/test/562-checker-no-intermediate/src/ |
Main.java | 21 * across the call to Math.abs(). 92 array[index] += Math.abs(-42);
|
/cts/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static/d/ |
T_invoke_static_1.java | 22 return Math.abs(-1234567);
|
T_invoke_static_19.java | 22 return Math.abs(-1234567);
|
/cts/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static_range/d/ |
T_invoke_static_range_1.java | 22 return Math.abs(-1234567);
|
T_invoke_static_range_19.java | 22 return Math.abs(-1234567);
|
/frameworks/support/dynamic-animation/src/android/support/animation/ |
SpringForce.java | 82 double mNaturalFreq = Math.sqrt(STIFFNESS_MEDIUM); 139 mNaturalFreq = Math.sqrt(stiffness); 229 if (Math.abs(velocity) < mVelocityThreshold 230 && Math.abs(value - getFinalPosition()) < mValueThreshold) { 256 + mNaturalFreq * Math.sqrt(mDampingRatio * mDampingRatio - 1); 258 - mNaturalFreq * Math.sqrt(mDampingRatio * mDampingRatio - 1); 261 mDampedFreq = mNaturalFreq * Math.sqrt(1 - mDampingRatio * mDampingRatio); 285 displacement = coeffA * Math.pow(Math.E, mGammaMinus * deltaT) 286 + coeffB * Math.pow(Math.E, mGammaPlus * deltaT) [all...] |
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowFloatMath.java | 28 return (float) Math.floor(value); 33 return (float) Math.ceil(value); 38 return (float) Math.sin(angle); 43 return (float) Math.cos(angle); 48 return (float) Math.sqrt(value);
|
/libcore/ojluni/src/main/java/java/lang/ |
StrictMath.java | 39 * {@code netlib} as the package "Freely Distributable Math 46 * <p>The Java math library is defined with respect to 180 // Do not delegate to Math.toRadians(angdeg) because 197 // Do not delegate to Math.toDegrees(angrad) because 374 int exponent = Math.getExponent(a); 450 double sign = Math.copySign(1.0, a); // preserve sign info 451 a = Math.abs(a); 654 return Math.round(a); 678 return Math.round(a); 720 * @see Math#addExact(int,int [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/ |
QSDetailClipper.java | 47 innerR = Math.abs(x); 48 innerR = Math.min(innerR, Math.abs(y)); 49 innerR = Math.min(innerR, Math.abs(w)); 50 innerR = Math.min(innerR, Math.abs(h)); 52 int r = (int) Math.ceil(Math.sqrt(x * x + y * y)); 53 r = (int) Math.max(r, Math.ceil(Math.sqrt(w * w + y * y))) [all...] |
/cts/libs/view/src/com/android/view/ |
Position.java | 50 return Math.sqrt(Math.pow((mX - other.mX), 2) + Math.pow((mY - other.mY), 2)); 64 double originToThisAngle = Math.atan2(origin.mY - mY, mX - origin.mX); 65 double originToOtherAngle = Math.atan2(origin.mY - other.mY, other.mX - origin.mX); 70 if (difference < -Math.PI) { 71 difference += 2 * Math.PI; 72 } else if (difference > Math.PI){ 73 difference -= 2 * Math.PI; 84 return Math.atan2(other.mY - mY, other.mX - mX) [all...] |
/frameworks/base/core/java/android/animation/ |
ArgbEvaluator.java | 68 startR = (float) Math.pow(startR, 2.2); 69 startG = (float) Math.pow(startG, 2.2); 70 startB = (float) Math.pow(startB, 2.2); 72 endR = (float) Math.pow(endR, 2.2); 73 endG = (float) Math.pow(endG, 2.2); 74 endB = (float) Math.pow(endB, 2.2); 84 r = (float) Math.pow(r, 1.0 / 2.2) * 255.0f; 85 g = (float) Math.pow(g, 1.0 / 2.2) * 255.0f; 86 b = (float) Math.pow(b, 1.0 / 2.2) * 255.0f; 88 return Math.round(a) << 24 | Math.round(r) << 16 | Math.round(g) << 8 | Math.round(b) [all...] |
/frameworks/support/graphics/drawable/animated/src/android/support/graphics/drawable/ |
ArgbEvaluator.java | 76 startR = (float) Math.pow(startR, 2.2); 77 startG = (float) Math.pow(startG, 2.2); 78 startB = (float) Math.pow(startB, 2.2); 80 endR = (float) Math.pow(endR, 2.2); 81 endG = (float) Math.pow(endG, 2.2); 82 endB = (float) Math.pow(endB, 2.2); 92 r = (float) Math.pow(r, 1.0 / 2.2) * 255.0f; 93 g = (float) Math.pow(g, 1.0 / 2.2) * 255.0f; 94 b = (float) Math.pow(b, 1.0 / 2.2) * 255.0f; 96 return Math.round(a) << 24 | Math.round(r) << 16 | Math.round(g) << 8 | Math.round(b) [all...] |
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/ |
CompareUtils.java | 10 int diff = Math.abs(Color.red(color) - Color.red(expectedColor)) 11 + Math.abs(Color.green(color) - Color.green(expectedColor)) 12 + Math.abs(Color.blue(color) - Color.blue(expectedColor)); 24 return Math.abs(Color.red(color) - average) <= threshold 25 && Math.abs(Color.green(color) - average) <= threshold 26 && Math.abs(Color.blue(color) - average) <= threshold;
|
/external/universal-tween-engine/java/api/src/aurelienribon/tweenengine/paths/ |
Linear.java | 11 int segment = (int) Math.floor((pointsCnt-1) * t); 12 segment = Math.max(segment, 0); 13 segment = Math.min(segment, pointsCnt-2);
|
/frameworks/base/core/java/android/gesture/ |
Instance.java | 30 0, (float) (Math.PI / 4), (float) (Math.PI / 2), (float) (Math.PI * 3 / 4), 31 (float) Math.PI, -0, (float) (-Math.PI / 4), (float) (-Math.PI / 2), 32 (float) (-Math.PI * 3 / 4), (float) -Math.PI 59 float magnitude = (float)Math.sqrt(sum); 94 float orientation = (float)Math.atan2(pts[1] - center[1], pts[0] - center[0]) [all...] |
/external/universal-tween-engine/java/api/src/aurelienribon/tweenengine/equations/ |
Circ.java | 14 return (float) -Math.sqrt(1 - t*t) - 1; 26 return (float) Math.sqrt(1 - (t-=1)*t); 38 if ((t*=2) < 1) return -0.5f * ((float)Math.sqrt(1 - t*t) - 1); 39 return 0.5f * ((float)Math.sqrt(1 - (t-=2)*t) + 1);
|
Expo.java | 14 return (t==0) ? 0 : (float) Math.pow(2, 10 * (t - 1)); 26 return (t==1) ? 1 : -(float) Math.pow(2, -10 * t) + 1; 40 if ((t*=2) < 1) return 0.5f * (float) Math.pow(2, 10 * (t - 1)); 41 return 0.5f * (-(float)Math.pow(2, -10 * --t) + 2);
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
FlingScroller.java | 69 return (int)Math.round(mCurrV * mCosAngle); 73 return (int)Math.round(mCurrV * mSinAngle); 85 double velocity = Math.hypot(velocityX, velocityY); 96 mDuration = (int)Math.round(FLING_DURATION_PARAM 97 * Math.pow(Math.abs(velocity), 1.0 / (DECELERATED_FACTOR - 1))); 100 mDistance = (int)Math.round( 108 progress = Math.min(progress, 1); 110 f = 1 - (float) Math.pow(f, DECELERATED_FACTOR); 117 int r = (int) Math.round(mStartX + f * mDistance * mCosAngle) [all...] |
/packages/apps/TV/src/com/android/tv/recommendation/ |
RandomEvaluator.java | 22 return Math.random();
|