Classes | Namespaces | Functions
vector2.h File Reference
#include <iostream>
#include <cmath>

Classes

class  RVO::Vector2
 

Namespaces

 RVO
 

Functions

RVO::Vector2 operator* (float a, const RVO::Vector2 &q)
 
std::ostream & operator<< (std::ostream &os, const RVO::Vector2 &q)
 
float absSq (const RVO::Vector2 &q)
 
float abs (const RVO::Vector2 &q)
 
RVO::Vector2 norm (const RVO::Vector2 &q)
 
RVO::Vector2 normal (const RVO::Vector2 &p, const RVO::Vector2 &q)
 
float atan (const RVO::Vector2 &q)
 
float det (const RVO::Vector2 &p, const RVO::Vector2 &q)
 

Detailed Description

Contains the Vector2 class; a two-dimensional vector, and some operations on a vector.

Function Documentation

◆ abs()

float abs ( const RVO::Vector2 q)
inline
Parameters
qA vector
Returns
The absolute value of the vector.

◆ absSq()

float absSq ( const RVO::Vector2 q)
inline
Parameters
qA vector
Returns
The squared absolute value of the vector.

◆ atan()

float atan ( const RVO::Vector2 q)
inline
Parameters
qA vector
Returns
The angle the vector makes with the positive x-axis. Is in the range [-PI, PI].

◆ det()

float det ( const RVO::Vector2 p,
const RVO::Vector2 q 
)
inline
Parameters
pA vector
qA vector
Returns
Returns the determinant of the 2x2 matrix formed by using p as the upper row and q as the lower row.

◆ norm()

RVO::Vector2 norm ( const RVO::Vector2 q)
inline
Parameters
qA vector
Returns
The normalized vector.

◆ normal()

RVO::Vector2 normal ( const RVO::Vector2 p,
const RVO::Vector2 q 
)
inline
Parameters
pA point
qA point
Returns
The normal vector to the line segment pq.

◆ operator*()

RVO::Vector2 operator* ( float  a,
const RVO::Vector2 q 
)
inline

Scalar multiplication.

Parameters
aThe left hand side scalar
qThe right hand side vector
Returns
The scalar multiplication of the lhs scalar and the rhs vector.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
const RVO::Vector2 q 
)
inline

Writes a vector to the standard output.

Parameters
osThe output stream
qThe vector
Returns
The standard output.