Make docs more uniform.

This commit is contained in:
Sebastian Schmidt 2023-05-16 17:55:24 +03:00
parent d427405f47
commit 0a46a244e0
2 changed files with 104 additions and 102 deletions

View File

@ -337,7 +337,7 @@ For more information about user-defined functions, refer to the respective [sect
This crate offers a set of builtin functions.
| Identifier | Argument Amount | Argument Types | Description |
|----------------------|-----------------|------------------------|-------------|
|----------------------|-----------------|-------------------------------|-------------|
| `min` | >= 1 | Numeric | Returns the minimum of the arguments |
| `max` | >= 1 | Numeric | Returns the maximum of the arguments |
| `len` | 1 | String/Tuple | Returns the character length of a string, or the amount of elements in a tuple (not recursively) |
@ -345,6 +345,8 @@ This crate offers a set of builtin functions.
| `round` | 1 | Numeric | Returns the nearest integer to a number. Rounds half-way cases away from 0.0 |
| `ceil` | 1 | Numeric | Returns the smallest integer greater than or equal to a number |
| `if` | 3 | Boolean, Any, Any | If the first argument is true, returns the second argument, otherwise, returns the third |
| `contains` | 2 | Tuple, any non-tuple | Returns true if second argument exists in first tuple argument. |
| `contains_any` | 2 | Tuple, Tuple of any non-tuple | Returns true if one of the values in the second tuple argument exists in first tuple argument. |
| `typeof` | 1 | Any | returns "string", "float", "int", "boolean", "tuple", or "empty" depending on the type of the argument |
| `math::is_nan` | 1 | Numeric | Returns true if the argument is the floating-point value NaN, false if it is another floating-point value, and throws an error if it is not a number |
| `math::is_finite` | 1 | Numeric | Returns true if the argument is a finite floating-point number, false otherwise |

View File

@ -320,7 +320,7 @@
//! This crate offers a set of builtin functions.
//!
//! | Identifier | Argument Amount | Argument Types | Description |
//! |----------------------|-----------------|------------------------|-------------|
//! |----------------------|-----------------|-------------------------------|-------------|
//! | `min` | >= 1 | Numeric | Returns the minimum of the arguments |
//! | `max` | >= 1 | Numeric | Returns the maximum of the arguments |
//! | `len` | 1 | String/Tuple | Returns the character length of a string, or the amount of elements in a tuple (not recursively) |
@ -328,8 +328,8 @@
//! | `round` | 1 | Numeric | Returns the nearest integer to a number. Rounds half-way cases away from 0.0 |
//! | `ceil` | 1 | Numeric | Returns the smallest integer greater than or equal to a number |
//! | `if` | 3 | Boolean, Any, Any | If the first argument is true, returns the second argument, otherwise, returns the third |
//! | `contains` | 2 | Tuple, Any non Tuple | Returns true if second argument exists in first argument. |
//! | `contains_any` | 2 | Tuple, Tuple of Any Non Tuple | Returns true if one of the values in the tuple of second argument exists in first argument(tuple). |
//! | `contains` | 2 | Tuple, any non-tuple | Returns true if second argument exists in first tuple argument. |
//! | `contains_any` | 2 | Tuple, Tuple of any non-tuple | Returns true if one of the values in the second tuple argument exists in first tuple argument. |
//! | `typeof` | 1 | Any | returns "string", "float", "int", "boolean", "tuple", or "empty" depending on the type of the argument |
//! | `math::is_nan` | 1 | Numeric | Returns true if the argument is the floating-point value NaN, false if it is another floating-point value, and throws an error if it is not a number |
//! | `math::is_finite` | 1 | Numeric | Returns true if the argument is a finite floating-point number, false otherwise |