Home
last modified time | relevance | path

Searched refs:angle (Results 1 – 25 of 82) sorted by relevance

1234

/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
DAnglesClassifier.java129 float angle = mLastThreePoints.get(1).getAngle(mLastThreePoints.get(0), in addPoint() local
133 if (angle < Math.PI - ANGLE_DEVIATION) { in addPoint()
135 } else if (angle <= Math.PI + ANGLE_DEVIATION) { in addPoint()
141 float difference = angle - mPreviousAngle; in addPoint()
146 if (mBiggestAngle < angle) { in addPoint()
147 mBiggestAngle = angle; in addPoint()
162 mPreviousAngle = angle; in addPoint()
DPoint.java77 float angle = (float) Math.acos(cos); in getAngle() local
79 angle = 2.0f * (float) Math.PI - angle; in getAngle()
81 return angle; in getAngle()
DSpeedAnglesClassifier.java120 float angle = mLastThreePoints.get(1).getAngle(mLastThreePoints.get(0), in addPoint() local
124 if (angle >= (float) Math.PI - ANGLE_DEVIATION) { in addPoint()
128 float difference = angle - mPreviousAngle; in addPoint()
132 mPreviousAngle = angle; in addPoint()
/frameworks/base/core/java/android/util/
DFloatMath.java69 public static float sin(float angle) { in sin() argument
70 return (float) Math.sin(angle); in sin()
80 public static float cos(float angle) { in cos() argument
81 return (float) Math.cos(angle); in cos()
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DSweepGradient_Delegate.java181 float angle; in getRaster() local
183 angle = (float) (dy < 0 ? 3 * Math.PI / 2 : Math.PI / 2); in getRaster()
185 angle = (float) (dx < 0 ? Math.PI : 0); in getRaster()
187 angle = (float) Math.atan(dy / dx); in getRaster()
190 angle += Math.PI * 2; in getRaster()
193 angle += Math.PI; in getRaster()
198 data[index++] = getGradientColor((float) (angle / (2 * Math.PI))); in getRaster()
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/
DCameraDeviceInfo.java198 protected static boolean orientationIsValid(int angle) { in orientationIsValid() argument
199 if (angle % 90 != 0) { in orientationIsValid()
203 if (angle < 0 || angle > 270) { in orientationIsValid()
/frameworks/base/docs/html/training/graphics/opengl/
Dtouch.jd17 <li><a href="#angle">Expose the Rotation Angle</a></li>
50 an angle of rotation for a shape.</p>
94 <p>Notice that after calculating the rotation angle, this method calls {@link
110 <h2 id="angle">Expose the Rotation Angle</h2>
112 <p>The example code above requires that you expose the rotation angle through your renderer by
127 public void setAngle(float angle) {
128 mAngle = angle;
136 <p>To apply the rotation generated by touch input, comment out the code that generates an angle and
137 add {@code mAngle}, which contains the touch input generated angle:</p>
146 // float angle = 0.090f * ((int) time);
/frameworks/base/core/java/android/transition/
DPatternPathMotion.java123 double angle = Math.atan2(dy, dx); in setPatternPath() local
124 mTempMatrix.postRotate((float) Math.toDegrees(-angle)); in setPatternPath()
134 double angle = Math.atan2(dy, dx); in getPath() local
137 mTempMatrix.postRotate((float) Math.toDegrees(angle)); in getPath()
/frameworks/native/opengl/libagl/
Dfp.cpp79 void sincosf(GLfloat angle, GLfloat* s, GLfloat* c) { in sincosf() argument
80 *s = sinef(angle); in sincosf()
81 *c = cosinef(angle); in sincosf()
/frameworks/base/core/java/android/gesture/
DGestureUtils.java451 final double angle = Math.atan(tan); in minimumCosineDistance() local
452 if (numOrientations > 2 && Math.abs(angle) >= Math.PI / numOrientations) { in minimumCosineDistance()
455 final double cosine = Math.cos(angle); in minimumCosineDistance()
505 float angle; in computeOrientedBoundingBox() local
507 angle = (float) -Math.PI/2; in computeOrientedBoundingBox()
509 angle = (float) Math.atan2(targetVector[1], targetVector[0]); in computeOrientedBoundingBox()
510 rotate(points, -angle); in computeOrientedBoundingBox()
534 …return new OrientedBoundingBox((float) (angle * 180 / Math.PI), centroid[0], centroid[1], maxx - m… in computeOrientedBoundingBox()
563 static float[] rotate(float[] points, float angle) { in rotate() argument
564 float cos = (float) Math.cos(angle); in rotate()
[all …]
DOrientedBoundingBox.java36 OrientedBoundingBox(float angle, float cx, float cy, float w, float h) { in OrientedBoundingBox() argument
37 orientation = angle; in OrientedBoundingBox()
DGestureOverlayView.java652 float angle = Math.abs(box.orientation); in touchMove() local
653 if (angle > 90) { in touchMove()
654 angle = 180 - angle; in touchMove()
659 angle < mGestureStrokeAngleThreshold : in touchMove()
660 angle > mGestureStrokeAngleThreshold)) { in touchMove()
/frameworks/rs/driver/runtime/
Drs_quaternion.c143 float angle = rsQuaternionDot(q0, q1); in rsQuaternionSlerp() local
144 if (angle < 0) { in rsQuaternionSlerp()
146 angle *= -1.0f; in rsQuaternionSlerp()
150 if (angle + 1.0f > 0.05f) { in rsQuaternionSlerp()
151 if (1.0f - angle >= 0.05f) { in rsQuaternionSlerp()
152 float theta = acos(angle); in rsQuaternionSlerp()
/frameworks/rs/java/tests/VrDemo/src/com/example/android/rs/vr/engine/
DQuaternion.java57 double angle = Math.acos(dot(vec1, vec2)); in set() local
58 set(angle, axis); in set()
73 public void set(double angle, double[] axis) { in set() argument
74 x[0] = Math.cos(angle / 2); in set()
75 double sin = Math.sin(angle / 2); in set()
Dbugdroid.rs43 float angle = fabs(2 * fract(atan2pi(vec.z, vec.y) * 5) - 1);
45 * sigmoid(pillDistance(p1, p2, img) - rad * (1 + angle / 2)));
63 float angle = fabs(2 * fract(atan2pi(vec.y, vec.x) * 6) - 1);
65 * sigmoid(cylinderDistance(p1, p2, img) - rad * (1 + angle / 5)));
106 float angle = fabs(2 * fract(atan2pi(vec.y, vec.x) * 20) - 1);
109 distanceDisk(center, circleRadius * (1 + angle / 10),
/frameworks/native/libs/input/tests/
DInputEvent_test.cpp521 static void setRotationMatrix(float matrix[9], float angle) { in setRotationMatrix() argument
522 float sin = sinf(angle); in setRotationMatrix()
523 float cos = cosf(angle); in setRotationMatrix()
551 float angle = float(i * ARC * PI_180); in TEST_F() local
555 pointerCoords[i].setAxisValue(AMOTION_EVENT_AXIS_X, sinf(angle) * RADIUS + 3); in TEST_F()
556 pointerCoords[i].setAxisValue(AMOTION_EVENT_AXIS_Y, -cosf(angle) * RADIUS + 2); in TEST_F()
557 pointerCoords[i].setAxisValue(AMOTION_EVENT_AXIS_ORIENTATION, angle); in TEST_F()
583 float angle = float((i * ARC + ROTATION) * PI_180); in TEST_F() local
584 ASSERT_NEAR(sinf(angle) * RADIUS, event.getX(i), 0.001); in TEST_F()
585 ASSERT_NEAR(-cosf(angle) * RADIUS, event.getY(i), 0.001); in TEST_F()
[all …]
/frameworks/base/tools/orientationplot/
DREADME.txt37 filtered accelerometer data, measured tilt and orientation angle, confidence
63 the measured orientation angle is now within the gap between the new
67 angle (say, 45 degrees) is between the current orientation's ideal angle
68 (say, 0 degrees) and an adjacent orientation's ideal angle (say, 90 degrees).
76 4. The orientation angle is not measured when the tilt is too close to 90 or -90
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/geometry/
DQuad.java112 public static Quad fromRotatedRect(RectF rect, float angle) { in fromRotatedRect() argument
113 return Quad.fromRect(rect).rotated(angle); in fromRotatedRect()
183 public Quad rotated(float angle) { in rotated() argument
185 float cosa = (float) Math.cos(angle); in rotated()
186 float sina = (float) Math.sin(angle); in rotated()
/frameworks/base/libs/hwui/
DMatrix.h124 void loadRotate(float angle);
125 void loadRotate(float angle, float x, float y, float z);
188 void rotate(float angle, float x, float y, float z) { in rotate() argument
190 u.loadRotate(angle, x, y, z); in rotate()
DMatrix.cpp316 void Matrix4::loadRotate(float angle) { in loadRotate() argument
317 angle *= float(M_PI / 180.0f); in loadRotate()
318 float c = cosf(angle); in loadRotate()
319 float s = sinf(angle); in loadRotate()
332 void Matrix4::loadRotate(float angle, float x, float y, float z) { in loadRotate() argument
341 angle *= float(M_PI / 180.0f); in loadRotate()
342 float c = cosf(angle); in loadRotate()
343 float s = sinf(angle); in loadRotate()
DSpotShadow.cpp91 void set(float angle, bool isPenumbra, int index) { in set()
92 mAngle = angle; in set()
102 static float angle(const Vector2& point, const Vector2& center) { in angle() function
258 float pivot = angle(points[p], center); in quicksortCirc()
260 while (angle(points[i], center) > pivot) { in quicksortCirc()
263 while (angle(points[j], center) < pivot) { in quicksortCirc()
348 float angle = 2 * i * M_PI / points; in computeLightPolygon() local
349 ret[i].x = cosf(angle) * size + lightCenter.x; in computeLightPolygon()
350 ret[i].y = sinf(angle) * size + lightCenter.y; in computeLightPolygon()
/frameworks/base/core/java/android/view/
DOrientationEventListener.java128 float angle = (float)Math.atan2(-Y, X) * OneEightyOverPi; in onSensorChanged() local
129 orientation = 90 - (int)Math.round(angle); in onSensorChanged()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DTransform3dActivity.java87 Matrix matrix, float angle) { in rotate() argument
89 camera.rotateY(angle); in rotate()
/frameworks/native/opengl/tests/gldual/src/com/android/gldual/
DTriangleRenderer.java84 float angle = 0.090f * ((int) time); in onDrawFrame() local
86 gl.glRotatef(angle, 0, 0, 1.0f); in onDrawFrame()
/frameworks/base/services/core/java/com/android/server/
DAnyMotionDetector.java236 float angle = previousGravityVectorNormalized.angleBetween(currentGravityVectorNormalized); in getStationaryStatus() local
237 if (DEBUG) Slog.d(TAG, "getStationaryStatus: angle = " + angle in getStationaryStatus()
239 if ((angle < mThresholdAngle) && (mRunningStats.getEnergy() < THRESHOLD_ENERGY)) { in getStationaryStatus()
241 } else if (Float.isNaN(angle)) { in getStationaryStatus()

1234