Vector From Angle

[Solved] Vector From Angle | Java - Code Explorer | yomemimo.com
Question : vector from angle

Answered by : that-one-useless-dev

# to get a vector from an angle, implement something like the code below:
vector = Vector2(cos(theta), sin(theta))
# if this doesn't give accurate results, check whether you are using the right
# angle units for the function (degs or rads) and if it is flipped around the
# mirror line y=x swap the cos ans sin functions.

Source : | Last Update : Thu, 16 Sep 21

Question : vector to angle

Answered by : crazy-caracal-5i18bhpw6pei

// note that Y is first
rad = atan2(y, x)
deg = atan2(y, x)*180/pi

Source : https://stackoverflow.com/questions/6247153/angle-from-2d-unit-vector | Last Update : Sun, 10 Jul 22

Answers related to vector from angle

Code Explorer Popular Question For Java