Skip to content
Forum Archive

Radians to Degrees

22 posts

Deamon#

Radians to Degrees

Avs sin() and cos() function are working with radians. However, I want it to work with degrees. For example: cos(60) should result in 0.5 instead of -0.95241.... . The problem is, I don't know where the radians come in. Is it the 60? or is it the result which is Radian? The general way to convert radian to degree is to multiply the radian with (180/$pi). This results in knowing that it is not the result that should just be multiplied, for the number get's quite big then, instead of a value between -1 and 1. Performing it this way "cos(60*(180/$pi))" aint working as well. I'm sure most of the code people around here know how it works, though I can't find it out.

Hope someone can help me.
Deamon#
The preset I was working on (a trig demo to the newbies). Here you can see very well where the problem lies. The variable a is the corner (dunno if that's correct english). It's in the most top control superscope.

Also I still have to write the comment, but I'll do that as soon as I got this working 🙂
UIUC85#
If you want to convert you gotta learn how to cancel. So you have your angle of 60 degrees. In order to convert you have to cancel out the degrees. So set it up like this since pi = 180 degrees...

(60 degrees) * (pi/180 degrees)

Now you can cancel the degrees and multiply giving you...

(60pi)/180

cancel 60 from the top and bottom and you get...

pi/3

There you go.
dirkdeftly#
Or you could just work in radians. Nobody uses degrees past trig, and by the time you're in trig you should already be used to using radians...It's also a whole lot faster to work in radians cos you don't waste code converting....
UnConeD#
Or everywhere else :P. It's the natural way of expressing angles...

360 degrees is a leftover from the Sumerians if I'm not mistaken. They had a radix-60 or radix-24 counting system (much more divisors than our 10), and left their mark on time-telling and geometry (24 hours, 60 minutes, 360 degrees, ...).
sidd#
Degrees came about after a year was divided into 4 cycling seasons and thus into 360 days. This wasnt the sumerians idea tho, it was well before. I think it was eastern. But the sumerians used this idea to create their entire maths system..

or somthing like that.
Zevensoft#
Well in the american education system you probably DO use degrees past trig. I mean they still teach imperial!!
UIUC85#
Guess that depends on what program you're a part of. I never use degrees anymore in my classes.
Tuggummi#
pi2/360 , doesn't that give you like one degree? Isn't it easy to multiply that then with what ever you want?
deg1=acos(-1)*2/360 ; deg57=deg1*57

Uhm... im so confused why something has to be explained so hard... 😔
dirkdeftly#
i'll say it again...there's no point in using degrees. computers use radians for a reason. it's faster. mathematicians use radians for a reason. it's easier.

don't expect to get anywhere using degrees 🙄
Tuggummi#
Well i don't know how to use either one of them if i even wanted... i just gave an "easier" way to use degrees... i guess 🤪
UIUC85#
pi/180 will give you the radian equivalent of 1 degree, not literally 1 degree. Thats why when you multiply it by the number of degrees you get the full radian value.
13373571#
to convert degrees to radians:

x*pi/180

to convert radians to degrees:

x*180/pi

Just plug the numbers in.

why has this discussion lasted so long?

edit: crud i revived a dead post 😱
UnConeD#
You didn't only revive a dead post, you also added exactly 0% extra information.

And in case you were wondering why UIUC85 was explaining it in such a 'weird' way, it's in fact the best way.
Units don't get enough emphasis in mathematics, but they're quite important in science. Plus they can help you remember certain formulas (just check if the units match up).

E.g.

Force = mass * acceleration
[1 newton] = [1 kg] * [1 m/(s^2)]
anubis2003#
Yep - I use units all the time. Especially since the TI-89 has them built in. I always use units when I'm working physics problems - that way if I mess up I know I did because the units don't come out right.