WPILibC++  2019.3.1
frc::Vector2d Struct Reference

This is a 2D vector struct that supports basic vector operations. More...

#include <Vector2d.h>

## Public Member Functions

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

## Detailed Description

This is a 2D vector struct that supports basic vector operations.

## Member Function Documentation

 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 - Release/arm/wpilibc/src/main/native/include/frc/drive/Vector2d.h