A special version of the cross product for 2D vectors (returns scalar value).
| 109 | |
| 110 | /// A special version of the cross product for 2D vectors (returns scalar value). |
| 111 | inline double crossProduct(const Vector2 a, const Vector2 b) { |
| 112 | return a.x*b.y-a.y*b.x; |
| 113 | } |
| 114 | |
| 115 | inline bool operator==(const Vector2 a, const Vector2 b) { |
| 116 | return a.x == b.x && a.y == b.y; |
no outgoing calls
no test coverage detected