Home
last modified time | relevance | path

Searched refs:Math (Results 1 – 25 of 731) sorted by relevance

12345678910>>...30

/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DCalendarAstronomer.java376 double JD = Math.floor(getJulianDay() - 0.5) + 0.5; in getSiderealOffset()
446 double sinE = Math.sin(obliq); in eclipticToEquatorial()
447 double cosE = Math.cos(obliq); in eclipticToEquatorial()
449 double sinL = Math.sin(eclipLong); in eclipticToEquatorial()
450 double cosL = Math.cos(eclipLong); in eclipticToEquatorial()
452 double sinB = Math.sin(eclipLat); in eclipticToEquatorial()
453 double cosB = Math.cos(eclipLat); in eclipticToEquatorial()
454 double tanB = Math.tan(eclipLat); in eclipticToEquatorial()
456 return new Equatorial(Math.atan2(sinL*cosE - tanB*sinE, cosL), in eclipticToEquatorial()
457 Math.asin(sinB*cosE + cosB*sinE*sinL) ); in eclipticToEquatorial()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DCalendarAstronomer.java378 double JD = Math.floor(getJulianDay() - 0.5) + 0.5; in getSiderealOffset()
448 double sinE = Math.sin(obliq); in eclipticToEquatorial()
449 double cosE = Math.cos(obliq); in eclipticToEquatorial()
451 double sinL = Math.sin(eclipLong); in eclipticToEquatorial()
452 double cosL = Math.cos(eclipLong); in eclipticToEquatorial()
454 double sinB = Math.sin(eclipLat); in eclipticToEquatorial()
455 double cosB = Math.cos(eclipLat); in eclipticToEquatorial()
456 double tanB = Math.tan(eclipLat); in eclipticToEquatorial()
458 return new Equatorial(Math.atan2(sinL*cosE - tanB*sinE, cosL), in eclipticToEquatorial()
459 Math.asin(sinB*cosE + cosB*sinE*sinL) ); in eclipticToEquatorial()
[all …]
/external/universal-tween-engine/java/api/src/aurelienribon/tweenengine/equations/
DElastic.java21 else s = p/(2*PI) * (float)Math.asin(1/a);
22 return -(a*(float)Math.pow(2,10*(t-=1)) * (float)Math.sin( (t-s)*(2*PI)/p ));
39 else s = p/(2*PI) * (float)Math.asin(1/a);
40 return a*(float)Math.pow(2,-10*t) * (float)Math.sin( (t-s)*(2*PI)/p ) + 1;
57 else s = p/(2*PI) * (float)Math.asin(1/a);
58 if (t < 1) return -.5f*(a*(float)Math.pow(2,10*(t-=1)) * (float)Math.sin( (t-s)*(2*PI)/p ));
59 return a*(float)Math.pow(2,-10*(t-=1)) * (float)Math.sin( (t-s)*(2*PI)/p )*.5f + 1;
DExpo.java14 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);
DCirc.java14 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);
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/
DShadowLocation.java250 lat1 *= Math.PI / 180.0; in computeDistanceAndBearing()
251 lat2 *= Math.PI / 180.0; in computeDistanceAndBearing()
252 lon1 *= Math.PI / 180.0; in computeDistanceAndBearing()
253 lon2 *= Math.PI / 180.0; in computeDistanceAndBearing()
262 double U1 = Math.atan((1.0 - f) * Math.tan(lat1)); in computeDistanceAndBearing()
263 double U2 = Math.atan((1.0 - f) * Math.tan(lat2)); in computeDistanceAndBearing()
265 double cosU1 = Math.cos(U1); in computeDistanceAndBearing()
266 double cosU2 = Math.cos(U2); in computeDistanceAndBearing()
267 double sinU1 = Math.sin(U1); in computeDistanceAndBearing()
268 double sinU2 = Math.sin(U2); in computeDistanceAndBearing()
[all …]
DShadowFloatMath.java28 return (float) Math.floor(value); in floor()
33 return (float) Math.ceil(value); in ceil()
38 return (float) Math.sin(angle); in sin()
43 return (float) Math.cos(angle); in cos()
48 return (float) Math.sqrt(value); in sqrt()
/external/crcalc/tests/src/com/hp/creals/
DSlowCRTest.java40 check(Math.abs(x - y) <= 0.000001, s); in checkApprEq()
68 if (Math.abs(xAsDouble) < 1000000.0) { in checkTrig()
69 checkApprEq(x.sin().doubleValue(), Math.sin(xAsDouble), in checkTrig()
71 checkApprEq(x.cos().doubleValue(), Math.cos(xAsDouble), in checkTrig()
73 checkApprEq(TAN.execute(x).doubleValue(), Math.tan(xAsDouble), in checkTrig()
75 checkApprEq(ATAN.execute(x).doubleValue(), Math.atan(xAsDouble), in checkTrig()
78 if (Math.abs(xAsDouble) < 1.0) { in checkTrig()
79 checkApprEq(x.asin().doubleValue(), Math.asin(xAsDouble), in checkTrig()
81 checkApprEq(x.acos().doubleValue(), Math.acos(xAsDouble), in checkTrig()
87 checkApprEq(COSINE.execute(x).doubleValue(), Math.cos(xAsDouble), in checkTrig()
[all …]
DCRTest.java63 if (Math.abs(x - y) > 0.000001) { in check_appr_eq()
142 check_appr_eq(Math.sin(n), CR.valueOf(n).sin().doubleValue(), in testCR()
144 check_appr_eq(Math.cos(n), CR.valueOf(n).cos().doubleValue(), in testCR()
146 check_appr_eq(Math.exp(n), CR.valueOf(n).exp().doubleValue(), in testCR()
148 check_appr_eq(Math.asin(0.1*n), in testCR()
151 check_appr_eq(Math.acos(0.1*n), in testCR()
155 check_appr_eq(Math.log(n), CR.valueOf(n).ln().doubleValue(), in testCR()
159 check_appr_eq(Math.cos(12345678.0), in testCR()
/external/drrickorang/LoopbackApp/app/src/main/java/org/drrickorang/loopback/
DFFT.java42 m = (int) (Math.log(mFFTSamplingSize) / Math.log(2)); in setUpFFT()
53 cos[i] = Math.cos(-2 * Math.PI * i / mFFTSamplingSize); in setUpFFT()
54 sin[i] = Math.sin(-2 * Math.PI * i / mFFTSamplingSize); in setUpFFT()
/external/xmp_toolkit/XMPCore/src/com/adobe/xmp/impl/
DXMPDateTimeImpl.java139 this.year = Math.min(Math.abs(year), 9999); in setYear()
215 this.hour = Math.min(Math.abs(hour), 23); in setHour()
233 this.minute = Math.min(Math.abs(minute), 59); in setMinute()
251 this.second = Math.min(Math.abs(second), 59); in setSecond()
/external/icu/android_icu4j/src/main/java/android/icu/util/
DIslamicCalendar.java565 ys = (year-1)*354 + (long)Math.floor((3+11*year)/30.0); in yearStart()
594 ms = (long)Math.ceil(29.5*realMonth) in monthStart()
595 + (realYear-1)*354 + (long)Math.floor((3+11*realYear)/30.0); in monthStart()
624 + (long)Math.floor(month * CalendarAstronomer.SYNODIC_MONTH) * ONE_DAY; in trueMonthStart()
668 age = age * 180 / Math.PI; in moonAge()
821 year = (int)Math.floor( (30 * days + 10646) / 10631.0 ); in handleComputeFields()
822 month = (int)Math.ceil((days - 29 - yearStart(year)) / 29.5 ); in handleComputeFields()
823 month = Math.min(month, 11); in handleComputeFields()
826 int months = (int)Math.floor(days / CalendarAstronomer.SYNODIC_MONTH); in handleComputeFields()
828 monthStart = (long)Math.floor(months * CalendarAstronomer.SYNODIC_MONTH - 1); in handleComputeFields()
[all …]
/external/webrtc/webrtc/examples/androidapp/src/org/appspot/apprtc/
DCaptureQualityController.java77 maxCaptureBandwidth = Math.max(maxCaptureBandwidth, in onProgressChanged()
86 (Math.exp(kExpConstant * bandwidthFraction) - 1) / (Math.exp(kExpConstant) - 1); in onProgressChanged()
108 return (int) Math.round(Math.min(format.maxFramerate, in calculateFramerate()
109 (int) Math.round(bandwidth / (format.width * format.height))) / 1000.0); in calculateFramerate()
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DAtomicDoubleTest.java28 -Math.PI,
35 Math.PI,
100 double prev = Math.E; in testCompareAndSet()
101 double unused = Math.E + Math.PI; in testCompareAndSet()
137 double prev = Math.E; in testWeakCompareAndSet()
138 double unused = Math.E + Math.PI; in testWeakCompareAndSet()
156 double prev = Math.E; in testGetAndSet()
/external/replicaisland/src/com/replica/replicaisland/
DCameraSystem.java105 mShakeOffsetY = (float) (Math.sin(mShakeTime * SHAKE_FREQUENCY) * mShakeMagnitude); in update()
136 if (Math.abs(xDelta) > X_FOLLOW_DISTANCE) { in update()
154 mFocalPosition.x = (float) Math.floor(mCurrentCameraPosition.x); in update()
157 mFocalPosition.y = (float) Math.floor(mCurrentCameraPosition.y + mShakeOffsetY); in update()
175 if (Math.abs(mFocalPosition.x - point.x) < (width + radius)) { in pointVisible()
176 if (Math.abs(mFocalPosition.y - point.y) < (height + radius)) { in pointVisible()
193 final float worldPixelWidth = Math.max(level.getLevelWidth(), width); in snapFocalPointToWorldBoundsX()
217 …final float worldPixelHeight = Math.max(level.getLevelHeight(), sSystemRegistry.contextParameters.… in snapFocalPointToWorldBoundsY()
/external/androidplot/Examples/DemoApp/src/com/androidplot/demos/
DListViewActivity.java79 double rl = Math.random(); in getView()
80 double gl = Math.random(); in getView()
81 double bl = Math.random(); in getView()
83 double rp = Math.random(); in getView()
84 double gp = Math.random(); in getView()
85 double bp = Math.random(); in getView()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DIslamicCalendar.java592 ys = (year-1)*354 + (long)Math.floor((3+11*year)/30.0); in yearStart()
621 ms = (long)Math.ceil(29.5*realMonth) in monthStart()
622 + (realYear-1)*354 + (long)Math.floor((3+11*realYear)/30.0); in monthStart()
651 + (long)Math.floor(month * CalendarAstronomer.SYNODIC_MONTH) * ONE_DAY; in trueMonthStart()
695 age = age * 180 / Math.PI; in moonAge()
854 year = (int)Math.floor( (30 * days + 10646) / 10631.0 ); in handleComputeFields()
855 month = (int)Math.ceil((days - 29 - yearStart(year)) / 29.5 ); in handleComputeFields()
856 month = Math.min(month, 11); in handleComputeFields()
859 int months = (int)Math.floor(days / CalendarAstronomer.SYNODIC_MONTH); in handleComputeFields()
861 monthStart = (long)Math.floor(months * CalendarAstronomer.SYNODIC_MONTH - 1); in handleComputeFields()
[all …]
/external/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/collator/
DCollationFrozenMonkeyTest.java70 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
71 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
72 String subs = source.substring(Math.min(s, slen), Math.min(s + slen, source.length())); in TestCollationKey()
73 String subt = source.substring(Math.min(t, tlen), Math.min(t + tlen, source.length())); in TestCollationKey()
161 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
162 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
163 String subs = source.substring(Math.min(s, slen), Math.min(s + slen, source.length())); in TestCompare()
164 String subt = source.substring(Math.min(t, tlen), Math.min(t + tlen, source.length())); in TestCompare()
DCollationMonkeyTest.java55 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
56 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
57 String subs = source.substring(Math.min(s, slen), Math.min(s + slen, source.length())); in TestCollationKey()
58 String subt = source.substring(Math.min(t, tlen), Math.min(t + tlen, source.length())); in TestCollationKey()
133 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
134 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
135 String subs = source.substring(Math.min(s, slen), Math.min(s + slen, source.length())); in TestCompare()
136 String subt = source.substring(Math.min(t, tlen), Math.min(t + tlen, source.length())); in TestCompare()
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/
DSensorManagerFacade.java321 if ((Math.abs(mXForce) > mThreshold) && (mXAxis == 1)) { in onSensorChanged()
326 if ((Math.abs(mYForce) > mThreshold) && (mYAxis == 2)) { in onSensorChanged()
331 if ((Math.abs(mZForce) > mThreshold) && (mZAxis == 4)) { in onSensorChanged()
353 if ((Math.abs(mXMag) > mThreshold) && (mXAxis == 1)) { in onSensorChanged()
357 if ((Math.abs(mYMag) > mThreshold) && (mYAxis == 2)) { in onSensorChanged()
361 if ((Math.abs(mZMag) > mThreshold) && (mZAxis == 4)) { in onSensorChanged()
414 if (Math.abs(mAzimuth) > ((double) mThreshold)) { in onSensorChanged()
421 if (Math.abs(mAzimuth) < ((double) mThreshold)) { in onSensorChanged()
428 if (Math.abs(mPitch) > ((double) mThreshold)) { in onSensorChanged()
435 if (Math.abs(mPitch) < ((double) mThreshold)) { in onSensorChanged()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/collator/
DCollationMonkeyTest.java56 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
57 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
58 String subs = source.substring(Math.min(s, slen), Math.min(s + slen, source.length())); in TestCollationKey()
59 String subt = source.substring(Math.min(t, tlen), Math.min(t + tlen, source.length())); in TestCollationKey()
134 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
135 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
136 String subs = source.substring(Math.min(s, slen), Math.min(s + slen, source.length())); in TestCompare()
137 String subt = source.substring(Math.min(t, tlen), Math.min(t + tlen, source.length())); in TestCompare()
DCollationFrozenMonkeyTest.java71 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
72 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCollationKey()
73 String subs = source.substring(Math.min(s, slen), Math.min(s + slen, source.length())); in TestCollationKey()
74 String subt = source.substring(Math.min(t, tlen), Math.min(t + tlen, source.length())); in TestCollationKey()
162 … int slen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
163 … int tlen = Math.abs(rand.nextInt(0x7fff) % source.length() - source.length()) % source.length(); in TestCompare()
164 String subs = source.substring(Math.min(s, slen), Math.min(s + slen, source.length())); in TestCompare()
165 String subt = source.substring(Math.min(t, tlen), Math.min(t + tlen, source.length())); in TestCompare()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/ec/
DECAlgorithms.java265 int widthP = Math.max(2, Math.min(16, WNafUtil.getWindowSize(k.bitLength()))); in implShamirsTrickWNaf()
266 int widthQ = Math.max(2, Math.min(16, WNafUtil.getWindowSize(l.bitLength()))); in implShamirsTrickWNaf()
289 …int width = Math.max(2, Math.min(16, WNafUtil.getWindowSize(Math.max(k.bitLength(), l.bitLength())…
309 int len = Math.max(wnafP.length, wnafQ.length);
331 int nP = Math.abs(wiP);
337 int nQ = Math.abs(wiQ);
370 int width = Math.max(2, Math.min(16, WNafUtil.getWindowSize(ki.bitLength()))); in implSumOfMultiplies()
425 …int width = Math.max(2, Math.min(16, WNafUtil.getWindowSize(Math.max(kj0.bitLength(), kj1.bitLengt…
442 len = Math.max(len, wnafs[i].length);
461 int n = Math.abs(wi);
/external/testng/src/test/java/test/tmp/
DExponentTest.java16 new Object[] { 0.0, Math.exp(0) }, in generateRandomExps()
17 new Object[] { 1.0, Math.exp(1) }, in generateRandomExps()
18 new Object[] { 2.0, Math.exp(2) }, in generateRandomExps()
38 return Math.exp(exponent); in myExpFunction()
/external/guava/guava/src/com/google/common/cache/
DCacheStats.java222 Math.max(0, hitCount - other.hitCount), in minus()
223 Math.max(0, missCount - other.missCount), in minus()
224 Math.max(0, loadSuccessCount - other.loadSuccessCount), in minus()
225 Math.max(0, loadExceptionCount - other.loadExceptionCount), in minus()
226 Math.max(0, totalLoadTime - other.totalLoadTime), in minus()
227 Math.max(0, evictionCount - other.evictionCount)); in minus()

12345678910>>...30