() of () (Operators): Difference between revisions

From PenguinMod Wiki
() of () (Operators)
Jump to navigation Jump to search
Content added Content deleted
m (Removed caption text)
No edit summary
Line 1: Line 1:
{{Needs Images}}
{{Blocks
{{Blocks
|block_img =
|block_img =<gallery>
Of of.png
</gallery>
|block_type = Reporter Block
|block_type = Reporter Block
|category = [[Operators]]
|category = [[Operators]]

Revision as of 12:55, 3 April 2024

() of ()
...
[[File:|200px]]
Caption
Block Type Reporter Block
Category / Extension Operators
Status Who tf uses status

The () of () block is a reporter block in the Operators category that allows for various functions to be used on a specific number. It originates from Scratch.

Operator Description Default
abs Absolute value Yes
floor Floor function (always rounds a decimal down [ex. 4.5 becomes 4, 10.1 becomes 10, 13.9 becomes 13, and 9 stays as 9]) No
ceiling Ceiling function (always rounds a decimal up [ex. 4.5 becomes 5, 10.1 becomes 11, 13.9 becomes 14, and 9 stays as 9])
sqrt Square root
sin Sine
cos Cosine
tan Tangent
asin Arcsine (inverse sine)
acos Arccosine (inverse cosine)
atan Arctangent (inverse tangent)
ln Natural log (log base e)
log Log base 10
e ^ Exp function (e^x)
10 ^ Raises 10 to a specific power

Workarounds

e ^ and 10 ^ can be replicated by using the () (v) () block, with 10 or the e reporter block as the first input, and "^" selected. ln and log can work around each other by using the change of base formula for logarithms, and can also be worked around using the () (v) () block with log selected.