Home
last modified time | relevance | path

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

12345

/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
DDiagonalClassifier.java68 float angle = getAngle(); in calculateFalsingResult() local
70 if (angle == Float.MAX_VALUE) { // Unknown angle in calculateFalsingResult()
86 boolean falsed = angleBetween(angle, minAngle, maxAngle) in calculateFalsingResult()
87 || angleBetween(angle, minAngle + NINETY_DEG, maxAngle + NINETY_DEG) in calculateFalsingResult()
88 || angleBetween(angle, minAngle - NINETY_DEG, maxAngle - NINETY_DEG) in calculateFalsingResult()
89 || angleBetween(angle, minAngle + ONE_HUNDRED_EIGHTY_DEG, in calculateFalsingResult()
102 private boolean angleBetween(float angle, float min, float max) { in angleBetween() argument
108 return angle >= min || angle <= max; in angleBetween()
111 return angle >= min && angle <= max; in angleBetween()
114 private float normalizeAngle(float angle) { in normalizeAngle() argument
[all …]
DZigZagClassifier.java193 double angle = Math.PI / 2 - getAtan2LastPoint(); in rotateVertical() local
194 logDebug("Rotating to vertical by: " + angle); in rotateVertical()
195 return rotateMotionEvents(getRecentMotionEvents(), -angle); in rotateVertical()
200 double angle = getAtan2LastPoint(); in rotateHorizontal() local
201 logDebug("Rotating to horizontal by: " + angle); in rotateHorizontal()
202 return rotateMotionEvents(getRecentMotionEvents(), angle); in rotateHorizontal()
205 private List<Point> rotateMotionEvents(List<MotionEvent> motionEvents, double angle) { in rotateMotionEvents() argument
207 double cosAngle = Math.cos(angle); in rotateMotionEvents()
208 double sinAngle = Math.sin(angle); in rotateMotionEvents()
/frameworks/av/media/libheadtracking/
DQuaternionUtil-test.cpp63 const float angle = M_PI * step * 0.1f; in TEST() local
65 quaternionToAngles(rotationVectorToQuaternion({angle, 0.f, 0.f}), &pitch, &roll, &yaw); in TEST()
66 EXPECT_NEAR(angle, pitch, NEAR); in TEST()
70 quaternionToAngles(rotationVectorToQuaternion({0.f, angle, 0.f}), &pitch, &roll, &yaw); in TEST()
72 EXPECT_NEAR(angle, roll, NEAR); in TEST()
75 quaternionToAngles(rotationVectorToQuaternion({0.f, 0.f, angle}), &pitch, &roll, &yaw); in TEST()
78 EXPECT_NEAR(angle, yaw, NEAR); in TEST()
97 const float angle = M_PI * step * 0.1f; in TEST() local
98 auto q = rotationVectorToQuaternion({angle, 0.f, 0.f}); in TEST()
104 EXPECT_NEAR(angle, pitch, NEAR); in TEST()
[all …]
DQuaternionUtil.cpp90 Quaternionf rotateX(float angle) { in rotateX() argument
91 return rotationVectorToQuaternion(Vector3f(1, 0, 0) * angle); in rotateX()
94 Quaternionf rotateY(float angle) { in rotateY() argument
95 return rotationVectorToQuaternion(Vector3f(0, 1, 0) * angle); in rotateY()
98 Quaternionf rotateZ(float angle) { in rotateZ() argument
99 return rotationVectorToQuaternion(Vector3f(0, 0, 1) * angle); in rotateZ()
/frameworks/native/opengl/include/EGL/
DPlatform.h36 namespace angle
151 using AddTraceEventFunc = angle::TraceEventHandle (*)(PlatformMethods *platform,
162 inline angle::TraceEventHandle DefaultAddTraceEvent(PlatformMethods *platform, in DefaultAddTraceEvent()
181 angle::TraceEventHandle eventHandle);
185 angle::TraceEventHandle eventHandle) in DefaultUpdateTraceEventDuration()
231 angle::WorkaroundsD3D *workaroundsD3D);
233 angle::WorkaroundsD3D *workaroundsD3D) in DefaultOverrideWorkaroundsD3D()
238 angle::FeaturesVk *workaroundsVulkan);
240 angle::FeaturesVk *workaroundsVulkan) in DefaultOverrideFeaturesVk()
313 ANGLE_PLATFORM_EXPORT bool ANGLE_APIENTRY ANGLEGetDisplayPlatform(angle::EGLDisplayType display,
[all …]
/frameworks/base/packages/EasterEgg/src/com/android/egg/landroid/
DAutopilot.kt73 ship.thrust = Vec2.makeWithAngleMag(ship.angle, 1f) in <lambda>()
121 target.velocity.angle(), in <lambda>()
130 ship.angle = (ship.pos - target.pos).angle() // point away from ground in <lambda>()
136 ship.angle = leadingVector.angle() in <lambda>()
138 ship.thrust = Vec2.makeWithAngleMag(ship.angle, 1.0f) in <lambda>()
144 ship.angle = (-ship.velocity).angle() in <lambda>()
151 ship.thrust = Vec2.makeWithAngleMag(ship.angle, decelThrust) in <lambda>()
DVec2.kt42 fun Vec2.angle(): Float { in Vec2() method
58 fun Vec2.rotate(angle: Float, origin: Vec2 = Vec2.Zero): Offset { in rotate()
62 (translated.x * cos(angle) - translated.y * sin(angle)), in rotate()
63 (translated.x * sin(angle) + translated.y * cos(angle)) in rotate()
DUniverse.kt71 val orbitAngle = (pos - orbitCenter).angle() in <lambda>()
80 val orbitAngle = (pos - orbitCenter).angle() in <lambda>()
175 ship.angle = 0f in initTest()
233 ship.angle = rng.nextFloat() * PI2f in initRandom()
258 vector.angle(), in updateAll()
282 val a = (ship.pos - planet.pos).angle() in solveAll()
290 val aDiff = (ship.angle - a).absoluteValue in solveAll()
372 val angle: Float, constant in Landing
378 val landingVector = Vec2.makeWithAngleMag(angle, ship.radius + planet.radius) in <lambda>()
381 ship.angle = angle in <lambda>()
[all …]
DPhysics.kt58 var angle = 0f variable
64 get() = angle - oangle
66 oangle = angle - value
117 Vec2.makeWithAngleMag(p.pos.angle(), radius - p.radius) * (1f - softness) in solve()
/frameworks/base/packages/SystemUI/unfold/src/com/android/systemui/unfold/updates/
DDeviceFoldStateProvider.kt118 private fun onHingeAngle(angle: Float) { in onHingeAngle()
123 "Hinge angle: $angle, " + in onHingeAngle()
130 if (angle < lastHingeAngle) FOLD_UPDATE_START_CLOSING else FOLD_UPDATE_START_OPENING in onHingeAngle()
135 val isClosing = angle < lastHingeAngleBeforeTransition in onHingeAngle()
139 Math.abs(angle - lastHingeAngleBeforeTransition) > HINGE_ANGLE_CHANGE_THRESHOLD_DEGREES in onHingeAngle()
140 val isFullyOpened = FULLY_OPEN_DEGREES - angle < FULLY_OPEN_THRESHOLD_DEGREES in onHingeAngle()
152 isClosingThresholdMet(angle) && // hinge angle is below certain threshold. in onHingeAngle()
161 notifyFoldUpdate(FOLD_UPDATE_FINISH_FULL_OPEN, angle) in onHingeAngle()
169 lastHingeAngle = angle in onHingeAngle()
170 outputListeners.forEach { it.onHingeAngleUpdate(angle) } in onHingeAngle()
[all …]
/frameworks/libs/systemui/toruslib/torus-math/src/main/java/com/google/android/torus/math/
DRotationQuaternion.kt85 val angle: Double constant in com.google.android.torus.math.RotationQuaternion
94 constructor(angle: Double, direction: Vector3) {
96 this.angle = angle
98 val angleRad = angle * DEG_TO_RAD
115 rotationQuaternion.angle,
184 if (angle != other.angle) return false in equals()
191 result = 31 * result + angle.hashCode() in hashCode()
/frameworks/base/core/java/android/util/
DFloatMath.java70 public static float sin(float angle) { in sin() argument
71 return (float) Math.sin(angle); in sin()
81 public static float cos(float angle) { in cos() argument
82 return (float) Math.cos(angle); in cos()
/frameworks/base/tests/GamePerformance/src/android/gameperformance/
DRenderPatch.java85 final double angle = Math.PI * 0.25 + (Math.PI * 2.0 * i) / (externalPointCount); in RenderPatch() local
87 mVertexBuffer.putFloat((float) (dimension * Math.sin(angle))); in RenderPatch()
88 mVertexBuffer.putFloat((float) (dimension * Math.cos(angle))); in RenderPatch()
91 mTextureBuffer.putFloat((float) (0.5 + 0.5 * Math.sin(angle))); in RenderPatch()
92 mTextureBuffer.putFloat((float) (0.5 - 0.5 * Math.cos(angle))); in RenderPatch()
/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/core/java/android/hardware/camera2/params/
DDeviceStateSensorOrientationMap.java207 public @NonNull Builder addOrientationForState(@DeviceState long deviceState, long angle) { in addOrientationForState() argument
208 if (angle % 90 != 0) { in addOrientationForState()
210 + angle); in addOrientationForState()
212 mDeviceStateOrientationMap.put(deviceState, Math.toIntExact(angle)); in addOrientationForState()
214 mElements.add(angle); in addOrientationForState()
/frameworks/base/apct-tests/perftests/core/src/android/graphics/perftests/
DPathIteratorPerfTest.java41 float angle = 0f; in constructCircularPath() local
43 float x = (float) Math.cos(angle) * radius; in constructCircularPath()
44 float y = (float) Math.sin(angle) * radius; in constructCircularPath()
52 angle += angleIncrement; in constructCircularPath()
/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/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/
DPipPinchResizingAlgorithm.java70 float angle = (float) Math.atan2(cross(mTmpDownVector, mTmpLastVector), in calculateBoundsAndAngle() local
72 return constrainRotationAngle((float) Math.toDegrees(angle)); in calculateBoundsAndAngle()
83 private float constrainRotationAngle(float angle) { in constrainRotationAngle() argument
85 return Math.signum(angle) * Math.max(0, (Math.abs(dampedRotate(angle)) - ANGLE_THRESHOLD)); in constrainRotationAngle()
/frameworks/base/services/foldables/devicestateprovider/src/com/android/server/policy/
DBookStylePreferredScreenCalculator.java89 public PreferredScreen calculatePreferredScreen(HingeAngle angle, boolean likelyTentOrWedge, in calculatePreferredScreen() argument
95 State newState = calculateNewState(mState, angle, likelyTentOrWedge, likelyReverseWedge); in calculatePreferredScreen()
98 newState = calculateNewState(mState, angle, likelyTentOrWedge, likelyReverseWedge); in calculatePreferredScreen()
104 "Can't settle state " + mState + ", inputs: hingeAngle = " + angle in calculatePreferredScreen()
113 "Reached invalid state " + mState + ", inputs: hingeAngle = " + angle in calculatePreferredScreen()
121 + " (hingeAngle = " + angle in calculatePreferredScreen()
/frameworks/base/tools/aapt2/link/
DXmlReferenceLinker_test.cpp270 xml::Attribute* xml_attr = gradient_el->FindAttribute(xml::kSchemaAndroid, "angle");
284 android:angle="90"/>)");
292 xml::Attribute* xml_attr = gradient_el->FindAttribute(xml::kSchemaAndroid, "angle");
314 xml::Attribute* xml_attr = gradient_el->FindAttribute(xml::kSchemaAndroid, "angle");
/frameworks/av/media/libheadtracking/include/media/
DQuaternionUtil.h43 Eigen::Quaternionf rotateX(float angle);
49 Eigen::Quaternionf rotateY(float angle);
55 Eigen::Quaternionf rotateZ(float angle);
/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 …]
/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/tests/java_api/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()
/frameworks/av/media/libaudiohal/impl/effectsAidlConversion/
DAidlConversionVirtualizer.cpp132 for (const auto& angle : angles) { in getParameter() local
135 angle.channel, false); in getParameter()
137 OK != param.writeToValue(&angle.azimuthDegree) || in getParameter()
138 OK != param.writeToValue(&angle.elevationDegree)) { in getParameter()

12345