Lines Matching refs:x
32 float x; member
35 float lengthSquared() const { return x * x + y * y; } in lengthSquared()
37 float length() const { return sqrt(x * x + y * y); } in length()
40 x += v.x;
45 x -= v.x;
50 x += v;
55 x -= v;
60 x /= s;
65 x *= s;
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}; }
79 x *= s; in normalize()
84 Vector2 v = {x, y}; in copyNormalized()
89 float dot(const Vector2& v) const { return x * v.x + y * v.y; } in dot()
91 float cross(const Vector2& v) const { return x * v.y - y * v.x; } in cross()
93 void dump() { ALOGD("Vector2[%.2f, %.2f]", x, y); } in dump()
99 float x;
103 Vector3 operator+(const Vector3& v) const { return (Vector3){x + v.x, y + v.y, z + v.z}; }
105 Vector3 operator-(const Vector3& v) const { return (Vector3){x - v.x, y - v.y, z - v.z}; }
107 Vector3 operator/(float s) const { return (Vector3){x / s, y / s, z / s}; }
109 Vector3 operator*(float s) const { return (Vector3){x * s, y * s, z * s}; }
112 ALOGD("%s[%.2f, %.2f, %.2f]", label, x, y, z);