Refactored Comparators instructions and added documentation

This commit is contained in:
Netkas 2022-12-30 03:01:38 -05:00
parent f071d1dc72
commit 671958063c
12 changed files with 321 additions and 71 deletions

View file

@ -1,11 +1,11 @@
# equals
# eq
Returns true if the two values are equal, false otherwise.
## Parameters
* a (`integer`, `float`, `double`, `string`, `boolean`, `instruction`) - The first value to compare.
* b (`integer`, `float`, `double`, `string`, `boolean`, `instruction`) - The second value to compare.
* a (`integer`, `float`, `double`, `string`, `boolean`) - The first value to compare.
* b (`integer`, `float`, `double`, `string`, `boolean`) - The second value to compare.
## Return
@ -21,7 +21,7 @@ Returns true if the two values are equal, false otherwise.
```json
{
"type": "equals",
"type": "eq",
"_": {
"a": "foo",
"b": "foo"
@ -31,5 +31,5 @@ Returns true if the two values are equal, false otherwise.
### Last Updated
Monday, December 29th, 2022.
Monday, December 30th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)

View file

@ -1,11 +1,11 @@
# greater_than
# gt
Returns true if the first argument is greater than the second argument.
## Parameters
* a (`integer`, `float`, `double`, `instruction`) - The first number.
* b (`integer`, `float`, `double`, `instruction`) - The second number.
* a (`integer`, `float`, `double`) - The first number.
* b (`integer`, `float`, `double`) - The second number.
## Return
@ -20,7 +20,7 @@ Returns true if the first argument is greater than the second argument.
```json
{
"type": "greater_than",
"type": "gt",
"_": {
"a": 10,
"b": 2
@ -30,5 +30,5 @@ Returns true if the first argument is greater than the second argument.
### Last Updated
Monday, December 29th, 2022.
Monday, December 30th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)

View file

@ -1,11 +1,11 @@
# greater_than_or_equals
# gte
Returns true if the first argument is greater than or equal to the second argument.
## Parameters
* a (`integer`, `float`, `double`, `instruction`) - The first number.
* b (`integer`, `float`, `double`, `instruction`) - The second number.
* a (`integer`, `float`, `double`) - The first number.
* b (`integer`, `float`, `double`) - The second number.
## Return
@ -20,7 +20,7 @@ Returns true if the first argument is greater than or equal to the second argume
```json
{
"type": "greater_than_or_equals",
"type": "gte",
"_": {
"a": 10,
"b": 2
@ -30,5 +30,5 @@ Returns true if the first argument is greater than or equal to the second argume
### Last Updated
Monday, December 29th, 2022.
Monday, December 30th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)

View file

@ -0,0 +1,34 @@
# lt
Returns true if the first argument is less than the second argument.
## Parameters
* a (`integer`, `float`, `double`) - The first number.
* b (`integer`, `float`, `double`) - The second number.
## Return
(`boolean`) - True if the first argument is less than the second argument.
## 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": "lt",
"_": {
"a": 10,
"b": 2
}
}
```
### Last Updated
Monday, December 30th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)

View file

@ -0,0 +1,34 @@
# lte
Returns true if the first argument is less than or equal to the second argument.
## Parameters
* a (`integer`, `float`, `double`) - The first number.
* b (`integer`, `float`, `double`) - The second number.
## Return
(`boolean`) - True if the first argument is less than or equal to the second argument.
## 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": "lte",
"_": {
"a": 10,
"b": 2
}
}
```
### Last Updated
Monday, December 30th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)

View file

@ -0,0 +1,35 @@
# neq
Returns true if the first argument is not equal to the second argument.
## Parameters
* a (`integer`, `float`, `double`, `string`, `boolean`) - The first value to compare.
* b (`integer`, `float`, `double`, `string`, `boolean`) - The second value to compare.
## Return
(`boolean`) - True if the first argument is not equal to the second argument.
## 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": "neq",
"_": {
"a": "foo",
"b": "foo"
}
}
```
### Last Updated
Monday, December 30th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)