[−][src]Function lyon_geom::utils::directed_angle
pub fn directed_angle<S: Scalar>(v1: Vector<S>, v2: Vector<S>) -> S
Angle between vectors v1 and v2 (oriented clockwise assyming y points downwards).
The result is a number between 0
and 2 * PI
.
ex: directed_angle([0,1], [1,0]) = 3/2 Pi rad
x __
0--> / \
y| | x--> v2
v \ |v1
v
Or, assuming y points upwards:
directed_angle([0,-1], [1,0]) = 1/2 Pi rad
^ v2
y| x-->
0--> v1 | /
x v-