papaScott Posted June 3, 2009 Share Posted June 3, 2009 ok, so wheres what i have. $Angle = $_POST['txtAngle']; $SinAngle = rad2deg(sin((float)$Angle)); echo $SinAngle; which is: -56.610042086. I know that the the sin() function returns a value in radians. i need that in degrees. Shouldn't this work? I've checked my calc and it gives me 0.5 as the sine of 30.(sin(30)). can someone please help? Link to comment https://forums.phpfreaks.com/topic/160734-solved-problem-coverting-radians-to-degrees-using-sin/ Share on other sites More sharing options...
papaScott Posted June 3, 2009 Author Share Posted June 3, 2009 Never mind, i found my problem. it should be $sinAngle = sin(deg2rad($angle)); Link to comment https://forums.phpfreaks.com/topic/160734-solved-problem-coverting-radians-to-degrees-using-sin/#findComment-848285 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.