36#define ABS_DBL(a) ((a) < 0.0 ? -(a) : (a)) 
   41                return (a->
x * b->
x) + (a->
y * b->
y);
 
   52        len = sqrt(pow(vec->
x, 2) + pow(vec->
y, 2));
 
   59        double sin_val, cos_val;
 
   71        vec->
x = (cos_val * temp.
x) - (sin_val * temp.
y);
 
   72        vec->
y = (sin_val * temp.
x) + (cos_val * temp.
y);
 
  119                len = sqrt(pow(vec->
x, 2) + pow(vec->
y, 2));
 
  131        return acos(cos_angle);
 
  137                res->
x = a->
x - b->
x;
 
  138                res->
y = a->
y - b->
y;
 
  145                res->
x = a->
x + b->
x;
 
  146                res->
y = a->
y + b->
y;
 
void vector_2d_scale(struct vector_2d *vec, double scale)
struct vector_2d * vector_2d_alloc(void)
void vector_2d_rotate(struct vector_2d *vec, double angle)
struct vector_2d * vector_2d_copy(struct vector_2d *opt_res, struct vector_2d *vec)
void vector_2d_normalize(struct vector_2d *vec)
double vector_2d_scalar_multipy(struct vector_2d *a, struct vector_2d *b)
double vector_2d_calculate_angle_between(struct vector_2d *a, struct vector_2d *b)
void vector_2d_subtract(struct vector_2d *res, struct vector_2d *a, struct vector_2d *b)
double vector_2d_abs(struct vector_2d *vec)
void vector_2d_add(struct vector_2d *res, struct vector_2d *a, struct vector_2d *b)
void vector_2d_free(struct vector_2d *vec)
Header for 2D Vector operations.