2016-03-18 11:36:04 +00:00
|
|
|
{{DISPLAYTITLE: _PI}}
|
2017-10-10 14:55:21 +00:00
|
|
|
The [[_PI]] function returns '''π''' as a [[_FLOAT]] value with an optional multiplier parameter.
|
2016-03-18 11:36:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{PageSyntax}}
|
2017-10-10 14:55:21 +00:00
|
|
|
: {{Parameter|circumference}} = [[_PI]][({{Parameter|multiplier}})]
|
2016-03-18 11:36:04 +00:00
|
|
|
|
|
|
|
|
2021-02-28 14:47:33 +00:00
|
|
|
{{PageParameters}}
|
2017-10-10 14:55:21 +00:00
|
|
|
* Optional {{Parameter|multiplier}} (''2 * radius'' in above syntax) allows multiplication of the π value.
|
2016-03-18 11:36:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{PageDescription}}
|
2017-10-10 14:55:21 +00:00
|
|
|
* Function can be used in to supply π or multiples in a program.
|
2016-03-18 11:36:04 +00:00
|
|
|
* Accuracy is determined by the return variable type [[AS]] [[SINGLE]], [[DOUBLE]] or [[_FLOAT]].
|
2017-10-10 14:55:21 +00:00
|
|
|
* The π value can also be derived using 4 * [[ATN]](1) for a [[SINGLE]] value.
|
2016-03-18 11:36:04 +00:00
|
|
|
|
|
|
|
|
2017-10-10 14:55:21 +00:00
|
|
|
{{PageExamples}}
|
2016-03-18 11:36:04 +00:00
|
|
|
''Example:'' Calculating the area of a circle using a [[SINGLE]] variable in this case.
|
|
|
|
{{CodeStart}}radius = 5
|
|
|
|
circlearea = {{Cl|_PI}}(radius ^ 2)
|
|
|
|
PRINT circlearea
|
|
|
|
{{CodeEnd}}
|
|
|
|
{{OutputStart}} 78.53982
|
|
|
|
{{OutputEnd}}
|
|
|
|
|
|
|
|
|
|
|
|
{{PageSeeAlso}}
|
|
|
|
* [[_ATAN2]], [[TAN]]
|
|
|
|
* [[ATN]] {{text|(arctangent)}}
|
|
|
|
* [[SIN]], [[COS]]
|
|
|
|
|
|
|
|
|
2019-04-15 01:15:33 +00:00
|
|
|
{{PageNavigation}}
|