/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/ |
D | DiagonalClassifier.java | 68 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 …]
|
D | ZigZagClassifier.java | 193 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/ |
D | QuaternionUtil-test.cpp | 63 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 …]
|
D | QuaternionUtil.cpp | 90 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/ |
D | Platform.h | 36 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/ |
D | Autopilot.kt | 73 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>()
|
D | Vec2.kt | 42 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()
|
D | Universe.kt | 71 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 …]
|
D | Physics.kt | 58 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/ |
D | DeviceFoldStateProvider.kt | 118 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/ |
D | RotationQuaternion.kt | 85 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/ |
D | FloatMath.java | 70 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/ |
D | RenderPatch.java | 85 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/ |
D | CameraDeviceInfo.java | 198 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/ |
D | DeviceStateSensorOrientationMap.java | 207 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/ |
D | PathIteratorPerfTest.java | 41 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/ |
D | PatternPathMotion.java | 123 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/ |
D | PipPinchResizingAlgorithm.java | 70 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/ |
D | BookStylePreferredScreenCalculator.java | 89 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/ |
D | XmlReferenceLinker_test.cpp | 270 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/ |
D | QuaternionUtil.h | 43 Eigen::Quaternionf rotateX(float angle); 49 Eigen::Quaternionf rotateY(float angle); 55 Eigen::Quaternionf rotateZ(float angle);
|
/frameworks/base/core/java/android/gesture/ |
D | GestureUtils.java | 451 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/ |
D | rs_quaternion.c | 143 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/ |
D | Quaternion.java | 57 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/ |
D | AidlConversionVirtualizer.cpp | 132 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()
|