#include <vector.h>
Public Types | |
typedef Real | value_type |
Public Member Functions | |
Vector () | |
Vector (const value_type &x, const value_type &y) | |
bool | is_valid () const |
value_type & | operator[] (const int &i) |
const value_type & | operator[] (const int &i) const |
const Vector & | operator+= (const Vector &rhs) |
const Vector & | operator-= (const Vector &rhs) |
const Vector & | operator *= (const value_type &rhs) |
const Vector & | operator/= (const value_type &rhs) |
Vector | operator+ (const Vector &rhs) const |
Vector | operator- (const Vector &rhs) const |
Vector | operator * (const value_type &rhs) const |
Vector | operator/ (const value_type &rhs) const |
Vector | operator- () const |
value_type | operator * (const Vector &rhs) const |
bool | operator== (const Vector &rhs) const |
bool | operator!= (const Vector &rhs) const |
value_type | mag_squared () const |
Returns the squared magnitude of the vector. | |
value_type | mag () const |
Returns the magnitude of the vector. | |
value_type | inv_mag () const |
Returns the reciprocal of the magnitude of the vector. | |
Vector | norm () const |
Returns a normalized version of the vector. | |
Vector | perp () const |
Returns a perpendicular version of the vector. | |
bool | is_equal_to (const Vector &rhs) const |
Static Public Member Functions | |
static const Vector | zero () |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns the squared magnitude of the vector.
|
|
Returns the magnitude of the vector.
|
|
Returns the reciprocal of the magnitude of the vector.
|
|
Returns a normalized version of the vector.
|
|
Returns a perpendicular version of the vector.
|
|
|
|
|