Sin degree's to radians
BlitzMax Forums/BlitzMax Programming/Sin degree's to radians| 
 | ||
| Sin(54.66*(Pi/180))=0.016649618 How would i convert it to output in radians? thus Sin(54.66*(Pi/180))=0.81573397 | 
| 
 | ||
| Multiply the result by 0.0174532925 (which is Pi/180) | 
| 
 | ||
| doesn't Sin and Cos return radians by default? Judging by math.mod's source code they do. | 
| 
 | ||
| Edit: double post... wierd | 
| 
 | ||
| GFK: I know thats the answer but it dosn't seem to work | 
| 
 | ||
| The *input* is an angle *not* the output... As BMax expects all angles to be in degrees, you need to convert from radians... Const RADIANS_TO_DEGREES! = 180.0! / Pi Const DEGREES_TO_RADIANS! = Pi / 180.0! Print "Sine of Rad = " + Sin(54.66 * DEGREES_TO_RADIANS!) ' wrong Print "Sine of Deg = " + Sin((54.66 * DEGREES_TO_RADIANS!) * RADIANS_TO_DEGREES!) ' right, but mad! Print "Sine of Deg = " + Sin(54.66) ' right I don't know why you'd want to convert degrees to radians and back again, but still. ;o) | 
| 
 | ||
| As Yan said. The output of sin represents a ratio of two lengths, so it's unitless. Maybe you are thinking of asin? | 
| 
 | ||
| Thank you very much Yan, just what i was looking for :) | 
| 
 | ||
| now how do you draw a filled circle ;) | 
| 
 | ||
|  now how do you draw a filled circle  DrawOval( x#,y#,width#,height# ) |