/Users/snape/Desktop/rvo-1/RVOLIB/vector2.h File Reference

`#include <iostream>`
`#include <cmath>`

Classes

class  RVO::Vector2

namespace  RVO

Functions

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

Detailed Description

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

Function Documentation

 float abs ( const RVO::Vector2 & q ) ` [inline]`
Parameters:
 q A vector
Returns:
The absolute value of the vector.
 float absSq ( const RVO::Vector2 & q ) ` [inline]`
Parameters:
 q A vector
Returns:
The squared absolute value of the vector.
 float atan ( const RVO::Vector2 & q ) ` [inline]`
Parameters:
 q A vector
Returns:
The angle the vector makes with the positive x-axis. Is in the range [-PI, PI].
 float det ( const RVO::Vector2 & p, const RVO::Vector2 & q ) ` [inline]`
Parameters:
 p A vector q A vector
Returns:
Returns the determinant of the 2x2 matrix formed by using p as the upper row and q as the lower row.
 RVO::Vector2 norm ( const RVO::Vector2 & q ) ` [inline]`
Parameters:
 q A vector
Returns:
The normalized vector.
 RVO::Vector2 normal ( const RVO::Vector2 & p, const RVO::Vector2 & q ) ` [inline]`
Parameters:
 p A point q A point
Returns:
The normal vector to the line segment pq.
 RVO::Vector2 operator* ( float a, const RVO::Vector2 & q ) ` [inline]`

Scalar multiplication.

Parameters:
 a The left hand side scalar q The right hand side vector
Returns:
The scalar multiplication of the lhs scalaer and the rhs vector.
 std::ostream& operator<< ( std::ostream & os, const RVO::Vector2 & q ) ` [inline]`

Writes a vector to the standard output.

Parameters:
 os The output stream q The vector
Returns:
The standard output.