point2line
index
 
Name angleFromTo ( )
Description Returns the delta angle from the forward angle of vector1 to the forward angle of vector2. Values are -PI to PI.
Syntax
angleFromTo(vector1, vector2);
Parameters
vector1,vector2   (Vect2,Vect2)
Returns angle in radians, or NaN if vectors are parallel (float)
Usage Web & Application
Related angleBetween ( )
angleBetweenUnits ( )
Examples
import point2line.Vect2;

Vect2 velocity1 = new Vect2( 1, 0 );
Vect2 velocity2 = new Vect2( 0, -1 );

float angle = Vect2.angleFromTo( velocity1, velocity2 );

println( degrees( angle ) ); // prints -90.0