/external/webkit/Source/JavaScriptCore/tests/mozilla/ecma/Math/ |
15.8.2.16.js | 34 var TITLE = "Math.sin(x)"; 45 array[item++] = new TestCase( SECTION, "Math.sin.length", 1, Math.sin.length ); 47 array[item++] = new TestCase( SECTION, "Math.sin()", Number.NaN, Math.sin() ); 48 array[item++] = new TestCase( SECTION, "Math.sin(null)", 0, Math.sin(null) ); 49 array[item++] = new TestCase( SECTION, "Math.sin(void 0)", Number.NaN, Math.sin(void 0) ); 50 array[item++] = new TestCase( SECTION, "Math.sin(false)", 0, Math.sin(false) ) [all...] |
15.8.2.11.js | 24 ECMA Section: 15.8.2.11 Math.max(x, y) 41 var TITLE = "Math.max(x, y)"; 53 array[item++] = new TestCase( SECTION, "Math.max.length", 2, Math.max.length ); 55 array[item++] = new TestCase( SECTION, "Math.max()", -Infinity, Math.max() ); 56 array[item++] = new TestCase( SECTION, "Math.max(void 0, 1)", Number.NaN, Math.max( void 0, 1 ) ); 57 array[item++] = new TestCase( SECTION, "Math.max(void 0, void 0)", Number.NaN, Math.max( void 0, void 0 ) ) [all...] |
15.8.2.10.js | 24 ECMA Section: 15.8.2.10 Math.log(x) 40 var TITLE = "Math.log(x)"; 52 array[item++] = new TestCase( SECTION, "Math.log.length", 1, Math.log.length ); 54 array[item++] = new TestCase( SECTION, "Math.log()", Number.NaN, Math.log() ); 55 array[item++] = new TestCase( SECTION, "Math.log(void 0)", Number.NaN, Math.log(void 0) ); 56 array[item++] = new TestCase( SECTION, "Math.log(null)", Number.NEGATIVE_INFINITY, Math.log(null) ) [all...] |
15.8.2.12.js | 24 ECMA Section: 15.8.2.12 Math.min(x, y) 42 var TITLE = "Math.min(x, y)"; 54 array[item++] = new TestCase( SECTION, "Math.min.length", 2, Math.min.length ); 56 array[item++] = new TestCase( SECTION, "Math.min()", Infinity, Math.min() ); 57 array[item++] = new TestCase( SECTION, "Math.min(void 0, 1)", Number.NaN, Math.min( void 0, 1 ) ); 58 array[item++] = new TestCase( SECTION, "Math.min(void 0, void 0)", Number.NaN, Math.min( void 0, void 0 ) ) [all...] |
/external/robolectric/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);
|
/external/v8/test/mjsunit/ |
math-min-max.js | 30 // Test Math.min(). 32 assertEquals(Infinity, Math.min()); 33 assertEquals(1, Math.min(1)); 34 assertEquals(1, Math.min(1, 2)); 35 assertEquals(1, Math.min(2, 1)); 36 assertEquals(1, Math.min(1, 2, 3)); 37 assertEquals(1, Math.min(3, 2, 1)); 38 assertEquals(1, Math.min(2, 3, 1)); 39 assertEquals(1.1, Math.min(1.1, 2.2, 3.3)); 40 assertEquals(1.1, Math.min(3.3, 2.2, 1.1)) [all...] |
math-abs.js | 36 assertEquals(0, Math.abs(0)); 37 assertEquals(0, Math.abs(zero())); 38 assertEquals(0, Math.abs(-0)); 39 assertEquals(Infinity, Math.abs(Infinity)); 40 assertEquals(Infinity, Math.abs(-Infinity)); 41 assertEquals(NaN, Math.abs(NaN)); 42 assertEquals(NaN, Math.abs(-NaN)); 43 assertEquals('Infinity', Math.abs(Number('+Infinity')).toString()); 44 assertEquals('Infinity', Math.abs(Number('-Infinity')).toString()); 45 assertEquals('NaN', Math.abs(NaN).toString()) [all...] |
/libcore/benchmarks/src/benchmarks/regression/ |
MathBenchmark.java | 35 Math.abs(d); 41 Math.abs(f); 47 Math.abs(i); 53 Math.abs(l); 59 Math.acos(d); 65 Math.asin(d); 71 Math.atan(d); 77 Math.atan2(3, 4); 83 Math.cbrt(d); 89 Math.ceil(d) [all...] |
/external/webkit/Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/ |
properties-002.js | 20 re_1.lastIndex = Math.pow(2,31); 21 AddRegExpCases( re_1, "\\cA?", true, false, false, Math.pow(2,31) ); 24 re_2.lastIndex = Math.pow(2,32) -1; 25 AddRegExpCases( re_2, "\\w*", false, true, false, Math.pow(2,32)-1 ); 28 re_3.lastIndex = Math.pow(2,31) -1; 29 AddRegExpCases( re_3, "\\*{0,80}", false, false, true, Math.pow(2,31) -1 ); 32 re_4.lastIndex = Math.pow(2,30) -1; 33 AddRegExpCases( re_4, "^.", true, true, true, Math.pow(2,30) -1 ); 36 re_5.lastIndex = Math.pow(2,30); 37 AddRegExpCases( re_5, "\\B", false, false, false, Math.pow(2,30) ) [all...] |
/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...] |
/frameworks/base/services/java/com/android/server/ |
TwilightCalculator.java | 31 private static final float DEGREES_TO_RADIANS = (float) (Math.PI / 180.0f); 82 final float solarLng = trueAnomaly + 1.796593063f + (float) Math.PI; 86 float n = Math.round(daysSince2000 - J0 - arcLongitude); 91 double solarDec = Math.asin(FloatMath.sin(solarLng) * FloatMath.sin(OBLIQUITY)); 95 double cosHourAngle = (FloatMath.sin(ALTIDUTE_CORRECTION_CIVIL_TWILIGHT) - Math.sin(latRad) 96 * Math.sin(solarDec)) / (Math.cos(latRad) * Math.cos(solarDec)); 111 float hourAngle = (float) (Math.acos(cosHourAngle) / (2 * Math.PI)) [all...] |
/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...] |
/libcore/luni/src/test/java/libcore/java/lang/ |
IntrinsicTest.java | 56 Math.abs(1); 57 Math.class.getMethod("abs", int.class).invoke(null, 1); 58 Math.abs(1L); 59 Math.class.getMethod("abs", long.class).invoke(null, 1L); 60 Math.abs(1.0f); 61 Math.class.getMethod("abs", float.class).invoke(null, 1.0f); 62 Math.abs(1.0); 63 Math.class.getMethod("abs", double.class).invoke(null, 1.0); 93 Math.min(1, 2); 94 Math.class.getMethod("min", int.class, int.class).invoke(null, 1, 2) [all...] |
/external/webkit/Source/JavaScriptCore/tests/mozilla/ecma/Expressions/ |
11.10-1.js | 74 shiftexp += Math.pow( 2, shiftpow ); 77 addexp += Math.pow(2, addpow); 95 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY ) { 98 return ( sign * Math.floor(Math.abs(n)) ); 104 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY) { 108 n = (sign * Math.floor( Math.abs(n) )) % Math.pow(2,32) [all...] |
11.10-2.js | 73 shiftexp += Math.pow( 2, shiftpow ); 76 addexp += Math.pow(2, addpow); 94 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY ) { 97 return ( sign * Math.floor(Math.abs(n)) ); 103 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY) { 107 n = (sign * Math.floor( Math.abs(n) )) % Math.pow(2,32) [all...] |
11.10-3.js | 73 shiftexp += Math.pow( 2, shiftpow ); 76 addexp += Math.pow(2, addpow); 94 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY ) { 97 return ( sign * Math.floor(Math.abs(n)) ); 103 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY) { 107 n = (sign * Math.floor( Math.abs(n) )) % Math.pow(2,32) [all...] |
11.4.8.js | 65 var p = Math.pow(2,i); 71 var p = -Math.pow(2,i); 86 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY ) { 89 return ( sign * Math.floor(Math.abs(n)) ); 95 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY) { 99 n = (sign * Math.floor( Math.abs(n) )) % Math.pow(2,32) [all...] |
11.7.2.js | 76 shiftexp = Math.pow( 2, power ); 87 shiftexp = -Math.pow( 2, power ); 107 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY ) { 110 return ( sign * Math.floor(Math.abs(n)) ); 116 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY) { 120 n = (sign * Math.floor( Math.abs(n) )) % Math.pow(2,32) [all...] |
11.7.1.js | 74 shiftexp = Math.pow( 2, power ); 93 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY ) { 96 return ( sign * Math.floor(Math.abs(n)) ); 102 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY) { 106 n = (sign * Math.floor( Math.abs(n) )) % Math.pow(2,32) [all...] |
11.7.3.js | 78 shiftexp = Math.pow( 2, power ); 98 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY ) { 101 return ( sign * Math.floor(Math.abs(n)) ); 107 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY) { 111 n = (sign * Math.floor( Math.abs(n) )) % Math.pow(2,32) [all...] |
/libcore/luni/src/main/native/ |
java_lang_Math.cpp | 17 #define LOG_TAG "Math" 24 #include <math.h> 111 NATIVE_METHOD(Math, IEEEremainder, "!(DD)D"), 112 NATIVE_METHOD(Math, acos, "!(D)D"), 113 NATIVE_METHOD(Math, asin, "!(D)D"), 114 NATIVE_METHOD(Math, atan, "!(D)D"), 115 NATIVE_METHOD(Math, atan2, "!(DD)D"), 116 NATIVE_METHOD(Math, cbrt, "!(D)D"), 117 NATIVE_METHOD(Math, ceil, "!(D)D"), 118 NATIVE_METHOD(Math, cosh, "!(D)D") [all...] |
/dalvik/tests/096-array-copy-concurrent-gc/src/ |
Main.java | 66 new String("Creating some garbage" + Math.random()); 67 new String("Creating some garbage" + Math.random()); 68 new String("Creating some garbage" + Math.random()); 69 new String("Creating some garbage" + Math.random()); 76 new String("Creating some garbage" + Math.random()); 77 new String("Creating some garbage" + Math.random()); 78 new String("Creating some garbage" + Math.random()); 79 new String("Creating some garbage" + Math.random());
|
/external/proguard/src/proguard/gui/splash/ |
SineTiming.java | 51 return 0.5 + 0.5 * Math.sin(2.0 * Math.PI * (time + phase) / period);
|
/frameworks/base/core/java/android/view/animation/ |
AccelerateDecelerateInterpolator.java | 36 return (float)(Math.cos((input + 1) * Math.PI) / 2.0f) + 0.5f;
|
/packages/apps/VideoEditor/src/com/android/videoeditor/widgets/ |
ZoomControl.java | 33 private static final double MAX_ANGLE = Math.PI / 3; 148 final double alpha = Math.atan((double)y / (double)x); 156 mThumbX = (int)((mRadius * Math.cos(alpha)) + (getWidth() / 2)); 157 mThumbY = (int)((getHeight() / 2) - (mRadius * Math.sin(alpha))); 160 mThumbX = (int)((mRadius * Math.cos(alpha)) + (getWidth() / 2)); 161 mThumbY = (int)((getHeight() / 2) - (mRadius * Math.sin(alpha))); 164 mThumbX = (int)((getWidth() / 2) - (mRadius * Math.cos(alpha))); 165 mThumbY = (int)((getHeight() / 2) + (mRadius * Math.sin(alpha))); 168 mThumbX = (int)((getWidth() / 2) - (mRadius * Math.cos(alpha))); 169 mThumbY = (int)((getHeight() / 2) + (mRadius * Math.sin(alpha))) [all...] |