WPILibC++  unspecified
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...
 

Public Attributes

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 Vector2d::Dot ( const Vector2d vec) const

Returns dot product of this vector with argument.

Parameters
vecVector with which to perform dot product.
void Vector2d::Rotate ( double  angle)

Rotate a vector in Cartesian space.

Parameters
angleangle by which to rotate vector counter-clockwise.
double Vector2d::ScalarProject ( const Vector2d vec) const

Returns scalar projection of this vector onto argument.

Parameters
vecVector onto which to project this vector.

The documentation for this struct was generated from the following files: