#include <geom/vec2.h>
Public Member Functions | |
vec2 (V x, V y) | |
template<class U> | |
vec2 (const vec2< U > &other) | |
template<class U> | |
vec2 & | operator= (const vec2< U > &other) |
V & | x () |
V & | y () |
const V & | x () const |
const V & | y () const |
vec2 | abs () const |
void | set (V x, V y) |
bool | operator== (const vec2< V > &b) |
double | length () const |
void | set_length (double len) |
void | set_polar_rad (double r, double theta) |
double | theta_deg () const |
void | set_theta_deg (double degrees) |
void | rotate_deg (double degrees) |
double | angle_to (const vec2< V > &b) const |
Result in radians. | |
double | distance_to (const vec2< V > &b) const |
template<class U> | |
void | scale_by (const U &factor) |
vec2 | operator* (const V &factor) const |
vec2 | operator/ (const V &factor) const |
template<class U> | |
vec2 & | operator*= (const U &factor) |
template<class U> | |
vec2 & | operator/= (const U &factor) |
vec2 | operator+ (const vec2< V > &rhs) const |
vec2 | operator- (const vec2< V > &rhs) const |
template<class U> | |
vec2 | operator* (const vec2< U > &rhs) const |
template<class U> | |
vec2 | operator/ (const vec2< U > &rhs) const |
template<class U> | |
vec2 & | operator+= (const vec2< U > &rhs) |
template<class U> | |
vec2 & | operator-= (const vec2< U > &rhs) |
template<class U> | |
vec2 & | operator*= (const vec2< U > &factor) |
template<class U> | |
vec2 & | operator/= (const vec2< U > &factor) |
void | debug_dump () const throw () |
Static Public Member Functions | |
static vec2 | zeros () |
static vec2 | ones () |
Definition at line 48 of file vec2.h.