Vector angle, length

Get help using Construct 2

Post » Thu Feb 13, 2014 7:18 pm

Hey all,

So I know that if I have a vector in Cartesian space I can find the the vector in polar coordinates (angle, length) by calculating as follows:

Angle = system angle(0,0,x,y)
length = sqrt (x * x + y * y)

This works, but is it the most efficient way? I always heard its a good idea to avoid sqrt because it takes a computer alot of work compared to other equations...

Is this the best way? or should i try something like L = x / cos(angle)
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,153

Return to How do I....?

Who is online

Users browsing this forum: marcinkowski and 14 guests