Go to the source code of this file.
Data Structures | |
struct | _vect2_cart |
Cartesian vector structure. More... | |
struct | _vect2_pol |
Polar vector structure. More... | |
Defines | |
#define | TO_RAD(x) (((double)x)*(M_PI/180.0)) |
#define | TO_DEG(x) (((double)x)*(180.0/M_PI)) |
Typedefs | |
typedef double | Real |
Definition of reals used in vector 2d. | |
typedef struct _vect2_cart | vect2_cart |
Cartesian vector structure. | |
typedef struct _vect2_pol | vect2_pol |
Polar vector structure. | |
Functions | |
void | vect2_pol2cart (vect2_pol *vp, vect2_cart *vc) |
Convert a polar vector to a cartesian one. | |
void | vect2_cart2pol (vect2_cart *vc, vect2_pol *vp) |
Convert a cartesian vector to a polar one. | |
void | vect2_add_pol (vect2_pol *v1, vect2_pol *v2, vect2_pol *vresult) |
Add 2 polar vectors and return the result. | |
void | vect2_add_cart (vect2_cart *v1, vect2_cart *v2, vect2_cart *vresult) |
Add 2 cartesian vectors and return the result. | |
void | vect2_sub_pol (vect2_pol *v1, vect2_pol *v2, vect2_pol *vresult) |
Substract 2 polar vectors and return the result. | |
void | vect2_sub_cart (vect2_cart *v1, vect2_cart *v2, vect2_cart *vresult) |
Substract 2 cartesian vectors and return the result. | |
void | vect2_scale_cart (vect2_cart *v1, Real alpha, vect2_cart *vresult) |
Multiply a cartesian vector by a scalar and return the result. | |
void | vect2_scale_pol (vect2_pol *v1, Real alpha, vect2_pol *vresult) |
Multiply a polar vector by a scalar and return the result. |
Definition in file vect2.h.
typedef struct _vect2_cart vect2_cart |
Cartesian vector structure.
typedef struct _vect2_pol vect2_pol |
Polar vector structure.