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

@ -0,0 +1,35 @@
# eq
Returns true if the two values are equal, false otherwise.
## 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 two values are equal, false otherwise.
## 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": "eq",
"_": {
"a": "foo",
"b": "foo"
}
}
```
### Last Updated
Monday, December 30th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)

View file

@ -0,0 +1,34 @@
# gt
Returns true if the first argument is greater 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 greater 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": "gt",
"_": {
"a": 10,
"b": 2
}
}
```
### Last Updated
Monday, December 30th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)

View file

@ -0,0 +1,34 @@
# gte
Returns true if the first argument is greater 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 greater 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": "gte",
"_": {
"a": 10,
"b": 2
}
}
```
### Last Updated
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)