#include <iostream>
#include <cmath>
Detailed Description
Contains the Vector2 class; a two-dimensional vector, and some operations on a vector.
Function Documentation
- Parameters:
-
- Returns:
- The absolute value of the vector.
- Parameters:
-
- Returns:
- The squared absolute value of the vector.
- Parameters:
-
- Returns:
- The angle the vector makes with the positive x-axis. Is in the range [-PI, PI].
- Parameters:
-
- Returns:
- Returns the determinant of the 2x2 matrix formed by using p as the upper row and q as the lower row.
- Parameters:
-
- Returns:
- The normalized vector.
- Parameters:
-
- Returns:
- The normal vector to the line segment pq.
Scalar multiplication.
- Parameters:
-
| a | The left hand side scalar |
| q | The right hand side vector |
- Returns:
- The scalar multiplication of the lhs scalar and the rhs vector.
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const RVO::Vector2 & |
q | |
|
) |
| | [inline] |
Writes a vector to the standard output.
- Parameters:
-
| os | The output stream |
| q | The vector |
- Returns:
- The standard output.