Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
fang::math::Vector2D< Unit > Struct Template Reference

#include <vector_2d.hpp>

Public Types

using unit = Unit
 

Public Member Functions

Vector2D< double > getRawVector () const
 
Unit getMagnitude () const
 
Vector2D< double > getUnitVector () const
 
Vector2D< Unit > operator- ()
 
Vector2D< Unit > operator+ (const Vector2D &addend)
 
Vector2D< Unit > operator- (const Vector2D &subtrahend)
 
Vector2D< Unit > operator* (double scalar)
 

Public Attributes

Unit x
 
Unit y
 

Member Typedef Documentation

◆ unit

template<typename Unit >
using fang::math::Vector2D< Unit >::unit = Unit

Member Function Documentation

◆ getMagnitude()

template<typename Unit >
Unit fang::math::Vector2D< Unit >::getMagnitude ( ) const
inline

◆ getRawVector()

template<typename Unit >
Vector2D< double > fang::math::Vector2D< Unit >::getRawVector ( ) const
inline

Provides the values free of units

◆ getUnitVector()

template<typename Unit >
Vector2D< double > fang::math::Vector2D< Unit >::getUnitVector ( ) const
inline

Does not work on zero vectors

◆ operator*()

template<typename Unit >
Vector2D< Unit > fang::math::Vector2D< Unit >::operator* ( double  scalar)
inline

◆ operator+()

template<typename Unit >
Vector2D< Unit > fang::math::Vector2D< Unit >::operator+ ( const Vector2D< Unit > &  addend)
inline

◆ operator-() [1/2]

template<typename Unit >
Vector2D< Unit > fang::math::Vector2D< Unit >::operator- ( )
inline

◆ operator-() [2/2]

template<typename Unit >
Vector2D< Unit > fang::math::Vector2D< Unit >::operator- ( const Vector2D< Unit > &  subtrahend)
inline

Member Data Documentation

◆ x

template<typename Unit >
Unit fang::math::Vector2D< Unit >::x

◆ y

template<typename Unit >
Unit fang::math::Vector2D< Unit >::y

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