Difference between revisions of "rad"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (add to Math Commands)
m (Text replacement - "\|gr([0-9]+) = " to "|gr$1= ")
 
(38 intermediate revisions by 10 users not shown)
Line 1: Line 1:
 +
{{RV|type=command
  
{{Command|= Comments
+
| ofp
____________________________________________________________________________________________
 
  
| ofp |= Game name
+
|1.00
  
|1.00|= Game version
+
|gr1= Math - Geometry
____________________________________________________________________________________________
 
  
| Convert x from degrees to radians. 360 degrees is equal to 2 multiplied with pi. |= Description
+
| Converts given value in degrees to radians. 1 radian equals 180 degrees divided by [[pi]].
____________________________________________________________________________________________
 
  
| '''rad''' x |= Syntax
+
| '''rad''' value
  
|p1= x: [[Number]] |= Parameter 1
+
|p1= value: [[Number]] - degrees
  
| [[Number]] |= Return value
+
| [[Number]] - radians
____________________________________________________________________________________________
 
 
   
 
   
|x1= <code>_radians <nowiki>=</nowiki> '''rad''' 180</code>
+
|x1= <code>_radians = [[rad]] 180; {{cc|Returns 3.1415 ([[pi]])}}</code>
Result is 3.1415|= Example 1
 
____________________________________________________________________________________________
 
 
 
|  |= See also
 
  
 +
|seealso= [[pi]], [[deg]]
 
}}
 
}}
  
<h3 style="display:none">Notes</h3>
 
<dl class="command_description">
 
<!-- Note Section BEGIN -->
 
 
<!-- Note Section END -->
 
</dl>
 
  
<h3 style="display:none">Bottom Section</h3>
+
{{GameCategory|arma1|Scripting Commands}}
[[Category:Scripting Commands|RAD]]
+
{{GameCategory|arma2|Scripting Commands}}
[[Category:Scripting Commands OFP 1.96|RAD]]
+
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands OFP 1.46|RAD]]
+
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands ArmA|RAD]]
 
[[Category:Command_Group:_Math|{{uc:{{PAGENAME}}}}]]
 

Latest revision as of 13:47, 11 April 2021

Hover & click on the images for descriptions

Description

Description:
Converts given value in degrees to radians. 1 radian equals 180 degrees divided by pi.

Syntax

Syntax:
rad value
Parameters:
value: Number - degrees
Return Value:
Number - radians

Examples

Example 1:
_radians = rad 180; // Returns 3.1415 (pi)

Additional Information

See also:
pideg
Groups:
Math - Geometry

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note