This is a 2D vector struct that supports basic vector operations.
More...
#include <Vector2d.h>
|
| Vector2d (double x, double y) |
|
void | Rotate (double angle) |
| Rotate a vector in Cartesian space. More...
|
|
double | Dot (const Vector2d &vec) const |
| Returns dot product of this vector with argument. More...
|
|
double | Magnitude () const |
| Returns magnitude of vector.
|
|
double | ScalarProject (const Vector2d &vec) const |
| Returns scalar projection of this vector onto argument. More...
|
|
|
double | x = 0.0 |
|
double | y = 0.0 |
|
This is a 2D vector struct that supports basic vector operations.
double frc::Vector2d::Dot |
( |
const Vector2d & |
vec | ) |
const |
Returns dot product of this vector with argument.
- Parameters
-
vec | Vector with which to perform dot product. |
void frc::Vector2d::Rotate |
( |
double |
angle | ) |
|
Rotate a vector in Cartesian space.
- Parameters
-
angle | angle in degrees by which to rotate vector counter-clockwise. |
double frc::Vector2d::ScalarProject |
( |
const Vector2d & |
vec | ) |
const |
Returns scalar projection of this vector onto argument.
- Parameters
-
vec | Vector onto which to project this vector. |
The documentation for this struct was generated from the following file:
- /var/lib/jenkins/workspace/WPILib/WPILib - Development/arm/wpilibc/src/main/native/include/frc/drive/Vector2d.h