Function: Deg
- Updated2023-02-21
- 2 minute(s) read
Function: Deg
Converts an angle from radians to degrees.
ReturnValue = Deg(Angle)
Input Parameters
| Angle | Specifies a numeric value or a variable in radians, or a data channel that contains radians. |
Return Parameters
| ReturnValue | Returns angles in degrees. |
Examples
The following example converts the value Pi/3 to its angle value.
| VBScript | Python |
Dim intMyResult intMyResult = Deg(Pi/3) 'intMyResult = 60
The following example converts the values in the Group1/Input data channel from radians into degrees and saves the results in the Group2/Result data channel.
| VBScript | Python |
Call Calculate ("Ch(""Group2/Result"")= Deg (Ch(""Group1/Input""))")
| Note You must use the Calculate command in scripts to calculate data channels with formulas. Compute the data channels according to the syntax in the Calculator. Refer to the procedures Executing Channel Calculations in the Calculator and Assigning a Value to a Variable in the Calculator for more information about the Calculator. |
| Note Use the Rad function to convert angle values from degree to radians. |
![]() | The input quantity must have the unit rad. The result quantity has the physical quantity Plane angle. The Input and Result Quantities for Quantity-Based Calculations page contains an overview of the input quantities and result quantities of all functions. Refer to the Help page Calculating Quantity-Based and Non-Quantity-Based in DIAdem for the conditions and rules for quantity-based calculations. |
Related Functions
Function: ^ | Function: Abs | Function: Ceil | Function: Eex | Function: Exp | Function: Fak | Function: Floor | Function: Frac | Function: Lg | Function: Ln | Function: MaxV | Function: MinV | Function: Mod | Function: Rad | Function: Random | Function: Rnd | Function: Round | Function: RTP (Real To Part of Date) | Function: RTT (Real to Text) | Function: Sign | Function: SND | Function: Sqr | Function: Sqrt | Function: Trunc | Function: VU
