레퍼런스 angleBetween()

angleBetween()

Calculates the angle between two vectors.

The angles returned are signed, which means that v1.angleBetween(v2) === -v2.angleBetween(v1).

If the vector was created with createVector(), angleBetween() returns angles in the units of the current angleMode().

예제

구문

angleBetween(value)

매개변수

value
p5.Vector: x, y, and z components of a p5.Vector.

반환값

Number: angle between the vectors.

관련 레퍼런스