Broad question, but how can I manually calculate a vector from an angle/radian as opposed to using p5.vector.fromAngle? (platform agonistic)

# Manually calculate "p5.vector.fromAngle?"

2 Likes

Hi commie630,

X would be Math.cos(angleInRadians)

Y would be Math.sin(angleInRadians)

That would give you a unit vectorâ€™s components for x and y.

Kind regards,

Manno

4 Likes