Added documentation for arithmetic instructions
This commit is contained in:
parent
933f194726
commit
e11efb01b9
10 changed files with 304 additions and 5 deletions
33
docs/instructions/arithmetic/round.md
Normal file
33
docs/instructions/arithmetic/round.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# round
|
||||
|
||||
Rounds a number to a given precision.
|
||||
|
||||
## Parameters
|
||||
|
||||
* value (`integer`, `float`, `double`) - The number to round.
|
||||
* precision (`integer`) - The number of decimal places to round to. (default: 0)
|
||||
|
||||
## Return
|
||||
|
||||
(`integer`, `float`, `double`) - The result of the rounding.
|
||||
|
||||
## Exceptions
|
||||
|
||||
* `EvaluationException` - If there was an error while evaluating one or more parameters.
|
||||
* `TypeException` - If one or more parameters are not of the expected type.
|
||||
|
||||
## Instruction Example
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "abs",
|
||||
"_": {
|
||||
"value": 10
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Last Updated
|
||||
|
||||
Monday, December 30th, 2022.
|
||||
Written by [Netkas](https://git.n64.cc/netkas)
|
Loading…
Add table
Add a link
Reference in a new issue