Gfx::vec2 is a 2-D vector class for representing 2-D points or distances. More...
#include <Image/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 |
double | theta_rad () 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 () |
Gfx::vec2 is a 2-D vector class for representing 2-D points or distances.
Definition at line 49 of file vec2.h.
double geom::vec2< V >::angle_to | ( | const vec2< V > & | b | ) | const [inline] |