angle

 
 
 

Returns the radian angle between two vectors.

float angle( vector vector1, vector vector2)

vector1 is one of the vectors.

vector2 is the other vector.

The returned angle is the shortest angle between the two vectors. The measurement is always less than 180 degrees.

Example

angle(<<2,-1,1>>,<<1,1,2>>)

Returns 1.0472 radians, which equals 60 degrees.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License