Searched refs:angle (Results 1 - 25 of 58) sorted by relevance

123

/frameworks/base/core/java/android/util/
H A DFloatMath.java65 * @param angle to compute the cosine of, in radians
66 * @return the sine of angle
69 public static float sin(float angle) { argument
70 return (float) Math.sin(angle);
76 * @param angle to compute the cosine of, in radians
77 * @return the cosine of angle
80 public static float cos(float angle) { argument
81 return (float) Math.cos(angle);
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
H A DPoint.java61 * Calculates the angle in radians created by points (a, this, b). If any two of these points
64 * @return the angle in radians
77 float angle = (float) Math.acos(cos);
79 angle = 2.0f * (float) Math.PI - angle;
81 return angle;
H A DAnglesClassifier.java28 * ignores the repetitions. If a new point is added, the classifier calculates the angle between
29 * the last three points. After that, it calculates the difference between this angle and the
30 * previously calculated angle. Then it calculates the variance of the differences from a stroke.
32 * angle and PI (angles are in radians). It helps with strokes which have few points and punishes
36 * angle is. It calculates the angle variance of the two parts and sums them up. The reason the
39 * final result is the minimum of angle variance of the whole stroke and the sum of angle variances
129 float angle = mLastThreePoints.get(1).getAngle(mLastThreePoints.get(0),
133 if (angle < Mat
[all...]
H A DSpeedAnglesClassifier.java28 * and then it calculates the angle variance of these points like the class
120 float angle = mLastThreePoints.get(1).getAngle(mLastThreePoints.get(0),
124 if (angle >= (float) Math.PI - ANGLE_DEVIATION) {
128 float difference = angle - mPreviousAngle;
132 mPreviousAngle = angle;
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/
H A DCameraDeviceInfo.java71 * @return The camera sensor orientation, or the counterclockwise angle
85 * rotation angle that must be applied to display preview
102 * rotation angle that must be applied to display these frames
198 protected static boolean orientationIsValid(int angle) { argument
199 if (angle % 90 != 0) {
203 if (angle < 0 || angle > 270) {
/frameworks/native/opengl/libagl/
H A Dfp.cpp62 // scale angle for easy argument reduction
79 void sincosf(GLfloat angle, GLfloat* s, GLfloat* c) { argument
80 *s = sinef(angle);
81 *c = cosinef(angle);
/frameworks/support/wear/tests/src/android/support/wear/widget/
H A DScrollManagerTest.java158 float angle = getAngle(fromX, fromY, TEST_WIDTH, TEST_HEIGHT);
167 angle += stepAngle;
168 x = getX(angle, radius, TEST_WIDTH);
169 y = getY(angle, radius, TEST_HEIGHT);
180 private static float getX(double angle, double radius, double viewWidth) { argument
181 double radianAngle = Math.toRadians(angle - 90);
186 private static float getY(double angle, double radius, double viewHeight) { argument
187 double radianAngle = Math.toRadians(angle - 90);
196 double angle = -Math.toDegrees(rowAngle) - 180;
197 if (angle <
[all...]
/frameworks/base/core/java/android/transition/
H A DPatternPathMotion.java123 double angle = Math.atan2(dy, dx);
124 mTempMatrix.postRotate((float) Math.toDegrees(-angle));
134 double angle = Math.atan2(dy, dx);
137 mTempMatrix.postRotate((float) Math.toDegrees(angle));
/frameworks/support/transition/src/android/support/transition/
H A DPatternPathMotion.java123 double angle = Math.atan2(dy, dx);
124 mTempMatrix.postRotate((float) Math.toDegrees(-angle));
134 double angle = Math.atan2(dy, dx);
137 mTempMatrix.postRotate((float) Math.toDegrees(angle));
/frameworks/base/core/java/android/gesture/
H A DOrientedBoundingBox.java36 OrientedBoundingBox(float angle, float cx, float cy, float w, float h) { argument
37 orientation = angle;
H A DGestureUtils.java451 final double angle = Math.atan(tan);
452 if (numOrientations > 2 && Math.abs(angle) >= Math.PI / numOrientations) {
455 final double cosine = Math.cos(angle);
505 float angle;
507 angle = (float) -Math.PI/2;
509 angle = (float) Math.atan2(targetVector[1], targetVector[0]);
510 rotate(points, -angle);
534 return new OrientedBoundingBox((float) (angle * 180 / Math.PI), centroid[0], centroid[1], maxx - minx, maxy - miny);
563 static float[] rotate(float[] points, float angle) { argument
564 float cos = (float) Math.cos(angle);
[all...]
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
H A DSweepGradient_Delegate.java165 // compute angle from each point to the center, and figure out the distance from
185 float angle;
187 angle = (float) (dy < 0 ? 3 * Math.PI / 2 : Math.PI / 2);
189 angle = (float) (dx < 0 ? Math.PI : 0);
191 angle = (float) Math.atan(dy / dx);
194 angle += Math.PI * 2;
197 angle += Math.PI;
202 data[index++] = getGradientColor((float) (angle / (2 * Math.PI)));
/frameworks/support/wear/tests/src/android/support/wear/widget/util/
H A DArcSwipe.java161 double angle = -Math.toDegrees(rowAngle) - 180;
162 if (angle < 0) {
163 angle += 360;
165 return (float) angle;
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/
H A DQuaternion.java57 double angle = Math.acos(dot(vec1, vec2));
58 set(angle, axis);
73 public void set(double angle, double[] axis) { argument
74 x[0] = Math.cos(angle / 2);
75 double sin = Math.sin(angle / 2);
/frameworks/rs/driver/runtime/
H A Drs_quaternion.c143 float angle = rsQuaternionDot(q0, q1); local
144 if (angle < 0) {
146 angle *= -1.0f;
150 if (angle + 1.0f > 0.05f) {
151 if (1.0f - angle >= 0.05f) {
152 float theta = acos(angle);
/frameworks/base/core/java/android/view/
H A DOrientationEventListener.java125 // Don't trust the angle if the magnitude is small compared to the y value
128 float angle = (float)Math.atan2(-Y, X) * OneEightyOverPi;
129 orientation = 90 - (int)Math.round(angle);
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
H A DTransform3dActivity.java87 Matrix matrix, float angle) {
89 camera.rotateY(angle);
86 rotate(float centerX, float centerY, Camera camera, Matrix matrix, float angle) argument
/frameworks/native/opengl/tests/gldual/src/com/android/gldual/
H A DTriangleRenderer.java84 float angle = 0.090f * ((int) time);
86 gl.glRotatef(angle, 0, 0, 1.0f);
/frameworks/rs/tests/java_api/RsNbody/src/com/example/android/rs/nbody_gl/
H A DBasicGLRenderer.java90 public void setAngle(float angle) { argument
91 mAngle = angle;
/frameworks/native/libs/input/tests/
H A DInputEvent_test.cpp521 static void setRotationMatrix(float matrix[9], float angle) { argument
522 float sin = sinf(angle);
523 float cos = cosf(angle);
537 // Each point 'i' is a point on a circle of radius ROTATION centered at (3,2) at an angle
540 // and check rotation. We set the orientation to the same angle.
551 float angle = float(i * ARC * PI_180); local
555 pointerCoords[i].setAxisValue(AMOTION_EVENT_AXIS_X, sinf(angle) * RADIUS + 3);
556 pointerCoords[i].setAxisValue(AMOTION_EVENT_AXIS_Y, -cosf(angle) * RADIUS + 2);
557 pointerCoords[i].setAxisValue(AMOTION_EVENT_AXIS_ORIENTATION, angle);
583 float angle local
[all...]
/frameworks/base/libs/hwui/
H A 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) { argument
190 u.loadRotate(angle, x, y, z);
H A DMatrix.cpp316 void Matrix4::loadRotate(float angle) { argument
317 angle *= float(M_PI / 180.0f);
318 float c = cosf(angle);
319 float s = sinf(angle);
332 void Matrix4::loadRotate(float angle, float x, float y, float z) { argument
341 angle *= float(M_PI / 180.0f);
342 float c = cosf(angle);
343 float s = sinf(angle);
H A DShadowTessellator.cpp181 float angle = acosf(dotProduct); local
182 return (int) floor(angle / divisor);
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/geometry/
H A DQuad.java109 * @param angle the angle to rotate the source rectangle in radians
110 * @return the Quad representing the source rectangle rotated by the given angle.
112 public static Quad fromRotatedRect(RectF rect, float angle) { argument
113 return Quad.fromRect(rect).rotated(angle);
176 * Rotate the quad by the given angle.
180 * @param angle the angle to rotate in radians
183 public Quad rotated(float angle) { argument
185 float cosa = (float) Math.cos(angle);
[all...]
/frameworks/native/libs/math/include/math/
H A Dquat.h131 // constructs a quaternion from an axis and angle
133 constexpr static TQuaternion PURE fromAxisAngle(const TVec3<A>& axis, B angle) {
134 return TQuaternion(std::sin(angle*0.5) * normalize(axis), std::cos(angle*0.5));

Completed in 365 milliseconds

123