V_cosine
Cosine of angle between two vectors.
|
Loading LOADSUB ALL FROM "VCOSINE.HTS"
or LOADSUB FROM "MATHLIB.HTS"
Usage REAL A(*),B(*),Y
Y=FNV_cosine(A(*),B(*))
Description
FNV_cosine computes the cosine of the angle between the vectors a and b. This is done by evaluating
where "" denotes the dot, or scalar, product and a and b denote the L-2 norm of the vectors a and b.
Errors
V_cosine causes an HTBasic error if A and B are not both of type REAL, if they do not have the same number of elements, or either A or B contain all zeros.
See Also
Norm, V_dot, V_proj
|