Page 116 of 346 Start Back Next End ZBasic System Library 104 ZBasic Microcontrollers DegToRad Type Function returning Single Invocation DegToRad(angle) Parameter Method Type Description angle ByVal Single The angle, in degrees, to convert to radian measure. Discussion The trigonometric functions in the System Library all use radian angle measure. Depending on the programming task, it is sometimes more convenient to think of angles in terms of degrees. This function and its inverse RadToDeg() facilitate the conversion between the two systems. Depending on optimization settings, if the parameter supplied to this function is known to be constant at compile time, the compiler converts the value at compile time. Otherwise, code is generated to perform the conversion (multiplication by a conversion factor) at run time. Example Dim f as Single Dim theta as Single ' the angle in degrees f = Sin(DegToRad(theta)) Compatibility This function is not available in BasicX compatibility mode. See Also RadToDeg