vec_magnitude_in_direction(3)

NAME
vec_magnitude_in_direction - calculate relative direction of two vectors

SYNOPSIS
#include <matvec.h>

float vec_magnitude_in_direction (const float *v1, const float *v2);

DESCRIPTION

If v1 and v2 are parallel and point in the same direction, then vec_magnitude_in_direction returns +1. If v1 and v2 are perpendicular, this returns 0. If v1 and v2 are parallel and point in opposite directions to each other, this returns -1. For other vectors, this function returns the cosine of the angle between the vectors.

AUTHOR
Richard Jones <rich@annexia.org>

LICENSE
GNU LGPL (see http://www.gnu.org/)

VERSION
c2lib-1.2.14

SEE ALSO
vec_dot_product(3), vec_angle_between(3)