Converting a radian to a degree

Post your work in progress addons and get feedback

Post » Sun Nov 09, 2014 7:48 am

Is there a way to do this in Construct2? If not, here's what I have so far in my plugin:

Math.degrees = function(rad)
{
return rad*(180/Math.PI);
}

Is this the best way? It works... but I'd rather use a built in method.
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Sun Nov 09, 2014 8:53 am

You can do this in C2 expressions. Just replace rad,

rad*180/PI
B
94
S
33
G
113
Posts: 5,356
Reputation: 73,273

Post » Sun Nov 09, 2014 5:09 pm

I did not know C2 had PI.... thanks man.
B
47
S
15
G
3
Posts: 201
Reputation: 4,625


Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest