vle-vector-angletoref


(vle-vector-angletoref  vec1  vec2  normal)

This function returns the angle between vectors vec1 and vec2, using normal as reference vector, which defines the vector plane.

Arguments

vec1  a 2d or 3d vector list

vec2  a 2d or 3d vector list

normal  a 2d or 3d vector list, specifies the plane normal

Return

double, angle in radians, in range 0 ... 2PI

Example

(setq v1 '(2 0 0) v2 '(0 3 0) normal '(0 0 1))
(vle-vector-angletoref v1 v2 normal)
1.5707963267949

(setq v1 '(2 0 0) v2 '(-1 -1 0) normal '(0 0 1))
(vle-vector-angletoref v1 v2 normal)
3.92699081698724

Remarks

input vectors must not be unit-length (non-normalised vectors are allowed)



©  Bricsys NV. All rights reserved.