Refactored Divide instruction and added documentation for the instruction.
This commit is contained in:
parent
574e7c51f9
commit
fea535aad2
2 changed files with 47 additions and 3 deletions
35
docs/divide.md
Normal file
35
docs/divide.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# divide
|
||||
|
||||
Divide two numbers.
|
||||
|
||||
## Parameters
|
||||
|
||||
* a (`integer`, `float`, `double`, `instruction`) - The number to divide.
|
||||
* b (`integer`, `float`, `double`, `instruction`) - The number to divide by.
|
||||
|
||||
## Return
|
||||
|
||||
(`integer`, `float`, `double`) - The result of the division.
|
||||
|
||||
## 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.
|
||||
* `ZeroDivisionException` - If the divisor is zero.
|
||||
|
||||
## Instruction Example
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "divide",
|
||||
"_": {
|
||||
"a": 10,
|
||||
"b": 2
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Last Updated
|
||||
|
||||
Monday, December 26th, 2022.
|
||||
Written by [Netkas](https://git.n64.cc/netkas)
|
Loading…
Add table
Add a link
Reference in a new issue