Constant (): Difference between revisions
Constant ()
Content deleted Content added
Created page with "{{Needs Images}} {{Infobox Block |block_img = |block_type = Reporter Block |category = Extra Mathematics |title = constant () }} The '''constant ()''' block is a reporter block in the Extra Mathematics extension that reports the value of various constants. ==Dropdown== {| class="wikitable" |+ Caption text |- ! Header text !! Notes !! Default |- | π || Reports pi (the ratio of a circle's circumference to it's diameter) || Yes |- | τ || Reports tau (2 times pi) |..." |
No edit summary |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Needs Images}} |
|||
{{Infobox Block |
{{Infobox Block |
||
|block_img = |
|block_img = <gallery> |
||
ConstantBlock.png|Block |
|||
ConstantWorkarounds.png|Workaround |
|||
</gallery> |
|||
|block_type = Reporter Block |
|block_type = Reporter Block |
||
|category = [[Extra Mathematics]] |
|category = [[Extra Mathematics]] |
||
Line 9: | Line 11: | ||
==Dropdown== |
==Dropdown== |
||
{| class="wikitable" |
{| class="wikitable" |
||
|+ Caption text |
|||
|- |
|- |
||
! |
! Constant !! Notes !! Default |
||
|- |
|- |
||
| π || Reports pi (the ratio of a circle's circumference to it's diameter) || Yes |
| π || Reports pi (the ratio of a circle's circumference to it's diameter) || Yes |
||
Line 22: | Line 23: | ||
|} |
|} |
||
==Workaround== |
==Workaround== |
||
This block can be worked around by using exact values for each constant. e can be replicated by using the existing [[e]] reporter block, or by using the [[() of () (Operators)|() of ()]] operators block with e^ selected and 1 as the number. π can be replicated by using the [[Π|π]] reporter block. τ can be replicated by multiplying the result of the π option by 2. |
This block can be worked around by using exact values for each constant. e can be replicated by using the existing [[e]] reporter block, or by using the [[() of () (Operators)|() of ()]] operators block with e^ selected and 1 as the number. π can be replicated by using the [[Π|π]] reporter block. τ can be replicated by multiplying the result of the π option by 2. Variables can be used if the values are used in multiple places in the code. |
||
<scratchblocks> |
|||
//e |
|||
e::operators reporter |
|||
([e ^ v] of (1)) |
|||
//pi |
|||
π::operators reporter |
|||
//tau |
|||
((π::operators) * (2)) |
|||
//phi |
|||
(((1) + ([sqrt v] of (5))) / (2) |
|||
[1.618034]::operators reporter |
|||
</scratchblocks> |
|||
{{DISPLAYTITLE:constant ()}} |
{{DISPLAYTITLE:constant ()}} |
||
[[Category:Reporter Blocks]] |
[[Category:Reporter Blocks]] |
Revision as of 21:37, 1 July 2024
constant () | |
---|---|
[[File:
| |
Block Type | Reporter Block |
Category / Extension | Extra Mathematics |
The constant () block is a reporter block in the Extra Mathematics extension that reports the value of various constants.
Dropdown
Constant | Notes | Default |
---|---|---|
π | Reports pi (the ratio of a circle's circumference to it's diameter) | Yes |
τ | Reports tau (2 times pi) | No |
ϕ | Reports phi (the golden ratio, or (1 + sqrt(5))/2) | |
e | Reports euler's number (e) |
Workaround
This block can be worked around by using exact values for each constant. e can be replicated by using the existing e reporter block, or by using the () of () operators block with e^ selected and 1 as the number. π can be replicated by using the π reporter block. τ can be replicated by multiplying the result of the π option by 2. Variables can be used if the values are used in multiple places in the code.
//e e::operators reporter ([e ^ v] of (1)) //pi π::operators reporter //tau ((π::operators) * (2)) //phi (((1) + ([sqrt v] of (5))) / (2) [1.618034]::operators reporter