point2line
index
 
Name angleBetweenUnits ( )
Description Returns the angle between the forward angles of two unit vectors. Use angleBetween() for vectors that are not normalized. This function is only included to occasionally save a couple of internal normalize calls.

The result is always positive. If you also need to know the rotational direction (clockwise or counter-clockwise) use angleFromTo().
Syntax
angleBetweenUnits(vector1, vector2);
Parameters
vector1,vector2   (Vect2,Vect2)
Returns angle in radians, or NaN if vectors are parallel (float)
Usage Web & Application
Related angleBetween ( )
Examples
import point2line.*;

Vect2 left = new Vect2( -1, 0 );
Vect2 up   = new Vect2( 0, -1 );

println( degrees( left.angle() ) );  // prints "180.0"
println( degrees( up.angle() ) );  // prints "270.0"

println( degrees( Vect2.angleBetweenUnits( left, up ) ) );  // prints "90.0"