Lines Matching refs:Vector2
21 struct Vector2 { struct
22 Vector2() : x(0), y(0) {} in Vector2() function
23 Vector2(float x, float y) : x(x), y(y) {} in Vector2() argument
24 Vector2(const Vector2& other) : x(other.x), y(other.y) {} in Vector2() argument
25 explicit Vector2(const FingerState& state) : x(state.position_x), in Vector2() argument
28 Vector2 Sub(const Vector2& other) { in Sub() argument
29 return Vector2(x - other.x, y - other.y); in Sub()
32 Vector2 Add(const Vector2& other) { in Add() argument
33 return Vector2(x + other.x, y + other.y); in Add()
42 bool operator==(const Vector2& that) const { argument
45 bool operator!=(const Vector2& that) const {
53 extern Vector2 Add(const Vector2& left, const Vector2& right); argument
54 extern Vector2 Sub(const Vector2& left, const Vector2& right);
55 extern float Dot(const Vector2& left, const Vector2& right);
88 Vector2 position() const { return position_; } in position()
91 Vector2 delta() const { return delta_; } in delta()
94 Vector2 origin_position() const { return origin_position_; } in origin_position()
96 Vector2 origin_delta() const { return Sub(position_, origin_position_); } in origin_delta()
100 Vector2 start_position() const { return start_position_; } in start_position()
102 Vector2 start_delta() const { return Sub(position_, start_position_); } in start_delta()
111 Vector2 position_;
112 Vector2 delta_;
113 Vector2 origin_position_;
114 Vector2 start_position_;
127 bool CloseEnoughToGesture(const Vector2& pos_a,
128 const Vector2& pos_b) const;