Home
last modified time | relevance | path

Searched refs:sqrt (Results 1 – 25 of 49) 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()
/frameworks/base/core/java/android/hardware/
DGeomagneticField.java284 return (float) Math.sqrt(mX * mX + mY * mY); in getHorizontalStrength()
291 return (float) Math.sqrt(mX * mX + mY * mY + mZ * mZ); in getFieldStrength()
315 (float) Math.sqrt(a2 * clat * clat + b2 * slat * slat); in computeGeocentricCoordinates()
323 + 2 * altitudeKm * (float) Math.sqrt(a2 * clat * clat + in computeGeocentricCoordinates()
327 mGcRadiusKm = (float) Math.sqrt(radSq); in computeGeocentricCoordinates()
402 * (float) Math.sqrt((n - m + 1) * (m == 1 ? 2 : 1)
DSensorManager.java1335 final float normH = (float)Math.sqrt(Hx*Hx + Hy*Hy + Hz*Hz); in getRotationMatrix()
1345 final float invA = 1.0f / (float)Math.sqrt(Ax*Ax + Ay*Ay + Az*Az); in getRotationMatrix()
1368 final float invE = 1.0f / (float)Math.sqrt(Ex*Ex + Ey*Ey + Ez*Ez); in getRotationMatrix()
1998 q0 = (q0 > 0) ? (float)Math.sqrt(q0) : 0; in getRotationMatrixFromVector()
2055 Q[0] = (Q[0] > 0) ? (float)Math.sqrt(Q[0]) : 0; in getQuaternionFromVector()
/frameworks/base/tools/layoutlib/bridge/src/android/util/
DFloatMath_Delegate.java91 /*package*/ static float sqrt(float value) { in sqrt() method in FloatMath_Delegate
92 return (float)Math.sqrt(value); in sqrt()
/frameworks/base/core/java/android/util/
DMathUtils.java93 return (float) Math.sqrt(x * x + y * y); in dist()
100 return (float) Math.sqrt(x * x + y * y + z * z); in dist()
104 return (float) Math.sqrt(a * a + b * b); in mag()
108 return (float) Math.sqrt(a * a + b * b + c * c); in mag()
DFloatMath.java73 public static native float sqrt(float value); in sqrt() method in FloatMath
/frameworks/base/core/java/android/gesture/
DGestureUtils.java42 private static final float NONUNIFORM_SCALE = (float) Math.sqrt(2);
228 float topLeft = (float) Math.sqrt(xFloorSq + yFloorSq); in plot()
229 float topRight = (float) Math.sqrt(xCeilingSq + yFloorSq); in plot()
230 float btmLeft = (float) Math.sqrt(xFloorSq + yCeilingSq); in plot()
231 float btmRight = (float) Math.sqrt(xCeilingSq + yCeilingSq); in plot()
296 float distance = (float) Math.sqrt(deltaX * deltaX + deltaY * deltaY); in temporalSampling()
382 sum += Math.sqrt(dx * dx + dy * dy); in computeTotalLength()
391 return (float) Math.sqrt(dx * dx + dy * dy) / totalLen; in computeStraightness()
397 return (float) Math.sqrt(dx * dx + dy * dy) / totalLen; in computeStraightness()
548 float rightside = (float) Math.sqrt(Math.pow(value, 2) - b); in computeOrientation()
DInstance.java59 float magnitude = (float)Math.sqrt(sum); in normalize()
DGestureStroke.java72 len += Math.sqrt(Math.pow(p.x - tmpPoints[(i - 1) * 2], 2) in GestureStroke()
/frameworks/base/media/libstagefright/codecs/m4v_h263/enc/src/
Dm4venc_oscl.h38 #define M4VENC_SQRT(x) sqrt(x)
/frameworks/base/libs/cpustats/
DCentralTendencyStatistics.cpp74 stddev = sqrt(variance()); in stddev()
/frameworks/base/core/java/android/webkit/
DViewManager.java176 fixedW = (int)Math.sqrt(area * v.width / v.height); in requestLayout()
179 fixedH = (int)Math.sqrt(area * v.height / v.width); in requestLayout()
/frameworks/base/graphics/java/android/graphics/
DPointF.java87 return FloatMath.sqrt(x * x + y * y); in length()
/frameworks/base/media/libstagefright/codecs/avc/enc/src/
Drate_control.cpp490 …Qstep = (int)(prev_QP * (sqrt(prev_RD / curr_RD) + prev_RD / curr_RD) / 2.0 + 0.9); /* Quadratic a… in calculateQuantizer_Multipass()
492 …Qstep = (int)(prev_QP * (sqrt(prev_RD / curr_RD) + pow(prev_RD / curr_RD, 1.0 / 3.0)) / 2.0 + 0.9); in calculateQuantizer_Multipass()
564 … diff_counter_BTdst = (int)(sqrt(curr_mad / (pMP->aver_mad + 0.0001)) * 10 + 0.4) - 10; in targetBitCalculation()
571 diff_counter_BTsrc = 10 - (int)(sqrt(curr_mad / (pMP->aver_mad + 0.0001)) * 10 + 0.5); in targetBitCalculation()
585 … diff_counter_BTdst = (int)(sqrt(curr_mad / (pMP->aver_mad_prev + 0.0001)) * 10 + 0.4) - 10; in targetBitCalculation()
592 … diff_counter_BTsrc = 10 - (int)(sqrt(curr_mad / (pMP->aver_mad_prev + 0.0001)) * 10 + 0.5); in targetBitCalculation()
/frameworks/base/libs/hwui/
DVector.h40 return sqrt(x * x + y * y); in length()
/frameworks/base/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/
Dthreshold.rs43 float coeff1 = 1.0f / (sqrt( 2.0f * pi ) * sigma);
/frameworks/base/core/java/android/widget/
DScroller.java375 float hyp = FloatMath.sqrt(dx * dx + dy * dy); in fling()
392 float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY); in fling()
DOverScroller.java176 return FloatMath.sqrt(squaredNorm); in getCurrVelocity()
744 mDuration = (int) (1000.0 * Math.sqrt(-2.0 * delta / mDeceleration)); in startSpringback()
805 final float totalDuration = (float) Math.sqrt( in fitOnBounceCurve()
/frameworks/base/opengl/tests/angeles/
Ddemo.c628 mag = (float)sqrt(z[0] * z[0] + z[1] * z[1] + z[2] * z[2]); in gluLookAt()
655 mag = (float)sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]); in gluLookAt()
662 mag = (float)sqrt(y[0] * y[0] + y[1] * y[1] + y[2] * y[2]); in gluLookAt()
/frameworks/compile/libbcc/lib/ScriptCRT/
Drs_cl.c534 extern float __attribute__((overloadable)) sqrt(float);
536 return 1.f / sqrt(v); in rsqrt()
568 FN_FUNC_FN(sqrt)
855 return sqrt(v.x*v.x + v.y*v.y); in length()
858 return sqrt(v.x*v.x + v.y*v.y + v.z*v.z); in length()
861 return sqrt(v.x*v.x + v.y*v.y + v.z*v.z + v.w*v.w); in length()
/frameworks/base/core/java/android/view/
DScaleGestureDetector.java646 mCurrLen = FloatMath.sqrt(cvx*cvx + cvy*cvy); in getCurrentSpan()
681 mPrevLen = FloatMath.sqrt(pvx*pvx + pvy*pvy); in getPreviousSpan()
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DRadialGradient_Delegate.java197 float distance = (float) Math.sqrt(_x * _x + _y * _y); in getRaster()
/frameworks/base/graphics/java/android/renderscript/
DMatrix3f.java122 float len = (float)java.lang.Math.sqrt(x*x + y*y + z*z); in loadRotate()
/frameworks/compile/slang/tests/P_math_fp/
Dmath_fp.rs137 TEST_FUNC_1(sqrt);
/frameworks/base/libs/rs/scriptc/
Drs_quaternion.rsh127 const float recipLen = 1.f / sqrt(len);
165 const float recipLen = 1.f / sqrt(len);

12