Home
last modified time | relevance | path

Searched refs:Vector2 (Results 1 – 5 of 5) sorted by relevance

/frameworks/libs/systemui/toruslib/torus-math/src/main/java/com/google/android/torus/math/
DVector2.kt26 class Vector2 @JvmOverloads constructor(val x: Float, val y: Float) { class
28 val ZERO = Vector2(0f, 0f)
29 val Y_AXIS = Vector2(0f, 1f)
30 val NEG_Y_AXIS = Vector2(0f, -1f)
31 val X_AXIS = Vector2(1f, 0f)
32 val NEG_X_AXIS = Vector2(-1f, 0f)
48 fun lerp(vectorStart: Vector2, vectorEnd: Vector2, amount: Float): Vector2 { in lerp()
49 return Vector2( in lerp()
58 constructor(vector: Vector2) : this(vector.x, vector.y)
60 fun plus(x: Float, y: Float): Vector2 { in plus()
[all …]
/frameworks/base/libs/hwui/
DVector.h31 struct Vector2 { struct
39 void operator+=(const Vector2& v) { argument
44 void operator-=(const Vector2& v) {
69 Vector2 operator+(const Vector2& v) const { return (Vector2){x + v.x, y + v.y}; }
71 Vector2 operator-(const Vector2& v) const { return (Vector2){x - v.x, y - v.y}; }
73 Vector2 operator/(float s) const { return (Vector2){x / s, y / s}; }
75 Vector2 operator*(float s) const { return (Vector2){x * s, y * s}; }
83 Vector2 copyNormalized() const { in copyNormalized() argument
84 Vector2 v = {x, y}; in copyNormalized()
89 float dot(const Vector2& v) const { return x * v.x + y * v.y; } in dot() argument
[all …]
DVertex.h47 static inline void set(Vertex* vertex, Vector2 val) { set(vertex, val.x, val.y); } in set()
/frameworks/libs/systemui/toruslib/torus-utils/src/main/java/com/google/android/torus/utils/interaction/
DGyro2dController.kt27 import com.google.android.torus.math.Vector2
54 var rotation: Vector2 = Vector2()
149 rotation = Vector2() in resetValues()
167 Vector2( in update()
172 Vector2(angles[0], angles[1]) in update()
204 fun isCurrentlySettled(referenceRotation: Vector2 = rotation): Boolean = in isCurrentlySettled()
208 fun isNearlySettled(referenceRotation: Vector2 = rotation): Boolean = in isCurrentlySettled()
216 private fun getErrorDistance(referenceRotation: Vector2 = rotation): Float { in isCurrentlySettled()
217 val targetOrientation = Vector2(angles[0], angles[1]) in isCurrentlySettled()
306 val maxAngleRotation: Vector2 = Vector2(2f),
/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/
Deigen.h14 using Vector2 = Vector<T, 2>; variable