Computer Science Canada SinCosTan (-1) |
Author: | chrispaks [ Thu Apr 14, 2005 5:30 pm ] |
Post subject: | SinCosTan (-1) |
Ok we have the codes sin, sind, cos, cosd, tan, tand...etc... If we have angle 50 and use cos (50) we will get 0.964966 What is the command (if there is any) to convert the 0.964966 into an angle (interger between 1-90)? Note: I dont want to enter a ton of if (variable) = 0.1028428 then put "The degree is ##" Instead, can Turing do the calculations for me? |
Author: | Martin [ Thu Apr 14, 2005 6:19 pm ] |
Post subject: | |
Sure it can. Your answer is in radians. There are 2 * pi radians in a circle. There are also 360 degrees in a circle. This gives us that there are 360 degrees / 2 * pi radians Now, we have how many radians there are, and we want to convert to degrees. Let the number of radians we have be x. We want to solve for how many degrees x is, which we'll denote by y. y degrees / x radians = 360 degrees / 2 * pi radians. Multiplying both sides by x we get: y = (360 * x) / (2 * pi) |
Author: | Andy [ Thu Apr 14, 2005 7:12 pm ] |
Post subject: | |
err martin? what are ut alkin about?? hes looking for an inverse function.... yea they do exist.. its called arcsin arccos and arctan arc stands for arc length, meaning its in radians |
Author: | lordofall [ Thu Apr 14, 2005 9:20 pm ] |
Post subject: | |
i wish somebody told me this like last week cause my group messed up hard at a compsci contest since we didn't know about arctan :@ (ya we didn't finish math yet lol) |
Author: | Martin [ Fri Apr 15, 2005 6:08 am ] |
Post subject: | |
Andy wrote: err martin? what are ut alkin about?? hes looking for an inverse function.... yea they do exist.. its called arcsin arccos and arctan arc stands for arc length, meaning its in radians
Ohh...right.... |
Author: | chrispaks [ Fri Apr 15, 2005 3:01 pm ] |
Post subject: | |
Martin wrote: Sure it can.
Your answer is in radians. There are 2 * pi radians in a circle. There are also 360 degrees in a circle. This gives us that there are 360 degrees / 2 * pi radians Now, we have how many radians there are, and we want to convert to degrees. Let the number of radians we have be x. We want to solve for how many degrees x is, which we'll denote by y. y degrees / x radians = 360 degrees / 2 * pi radians. Multiplying both sides by x we get: y = (360 * x) / (2 * pi) so if you had to put that in a code for me to copy and paste, which way would I put it in? var y, x : real const pi : 3.14 (forget if you have to have var name or not as in real) get x y = (360 * x) / (2 * pi) put y |
Author: | Andy [ Fri Apr 15, 2005 3:31 pm ] |
Post subject: | |
omg read the posts you idiot |
Author: | Martin [ Sat Apr 16, 2005 5:04 am ] |
Post subject: | |
Umm, Andy...read the first post again... |
Author: | Martin [ Sat Apr 16, 2005 5:06 am ] |
Post subject: | |
chrispaks wrote: Martin wrote: Sure it can.
Your answer is in radians. There are 2 * pi radians in a circle. There are also 360 degrees in a circle. This gives us that there are 360 degrees / 2 * pi radians Now, we have how many radians there are, and we want to convert to degrees. Let the number of radians we have be x. We want to solve for how many degrees x is, which we'll denote by y. y degrees / x radians = 360 degrees / 2 * pi radians. Multiplying both sides by x we get: y = (360 * x) / (2 * pi) so if you had to put that in a code for me to copy and paste, which way would I put it in? var y, x : real const pi : 3.14 (forget if you have to have var name or not as in real) get x y = (360 * x) / (2 * pi) put y Yep. ![]() |