Function lyon_core::math_utils::directed_angle
[−]
[src]
pub fn directed_angle(a: Vec2, b: Vec2) -> f32
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-