Difference between revisions of "rad"

From Bohemia Interactive Community
Jump to navigation Jump to search
m
 
(32 intermediate revisions by 13 users not shown)
Line 1: Line 1:
back to [[Scripting_Reference#R|COMREF]]
+
{{Command|Comments=
 +
____________________________________________________________________________________________
  
<h2 style="color:#000066">'''rad ''x'''''</h2>
+
| ofp |Game name=
  
 +
|1.00|Game version=
  
'''Operand types:'''
+
|gr1 = Math - Geometry |GROUP1=
 +
____________________________________________________________________________________________
  
'''x:''' [[ Number]]
+
| Converts given value in degrees to radians. 1 radian equals 180 degrees divided by [[pi]]. |DESCRIPTION=
 +
____________________________________________________________________________________________
  
'''Type of returned value:'''
+
| '''rad''' value |SYNTAX=
  
[[Number]]
+
|p1= value: [[Number]] - degrees
  
'''Description:'''
+
| [[Number]] - radians |RETURNVALUE=
 +
____________________________________________________________________________________________
 +
 
 +
|x1= <code>_radians = [[rad]] 180;{{cc|Returns 3.1415 ([[pi]])}}</code> |EXAMPLE1=
 +
____________________________________________________________________________________________
  
Convert '''x''' from degrees to radians.
+
| [[pi]], [[deg]] |SEEALSO=
  
 +
}}
  
'''Example:'''
+
<h3 style="display:none">Notes</h3>
 +
<dl class="command_description">
 +
<!-- Note Section BEGIN -->
  
_radians = '''rad''' 180 ...... Result is 3.1415
+
<!-- Note Section END -->
 +
</dl>
 +
 
 +
<h3 style="display:none">Bottom Section</h3>
 +
[[Category:Scripting Commands|RAD]]
 +
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
 +
[[Category:Scripting Commands OFP 1.96|RAD]]
 +
[[Category:Scripting Commands OFP 1.46|RAD]]
 +
[[Category:Scripting Commands Armed Assault|RAD]]
 +
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
 +
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
 +
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 17:12, 29 September 2020

Introduced with Operation Flashpoint version 1.001.00
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

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.

Notes

Bottom Section