next up previous contents
Next: 2D Matrix Algebra Functions Up: 2D and 3D vector Previous: 2D Vector Algebra Functions   Contents

2D Vector Geometry Functions

These have similar functionality to the corresponding 3D functions. Only those which are different are commented on here.

Vec2 vec2_midpoint(Vec2 q1, Vec2 q2)

Vec2 vec2_projperp(Vec2 u, Vec2 v)

Vec2 vec2_projpar(Vec2 u, Vec2 v)

Vec2 vec2_proj_on_line(Vec2 q, Vec2 l, Vec2 v)

Vec2 vec2_inter_lines(Vec2 l1, Vec2 v1, Vec2 l2, Vec2 v2)

void vec2_join_2_points(Vec2 q1, Vec2 q2, Vec2 *l, Vec2 *v)

double vec2_dist_point_line(Vec2 q, Vec2 l, Vec2 v)

void vec2_circ_3_points(Vec2 p1, Vec2 p2, Vec2 p3, Vec2 *centre, double radius)



root 2017-11-24