API
Multiply a value by a given factor.
This is a simple example function intended for use in documentation generated by mkdocstrings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
The number to be multiplied. |
required |
factor
|
float
|
The factor to multiply |
2.0
|
Returns:
| Type | Description |
|---|---|
float
|
The product of |
Examples:
Add two numbers together.
This function is documented in a way that mkdocstrings can automatically extract and render.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
float
|
float The first number to add. |
required |
b
|
float
|
float The second number to add. |
required |
Returns:
| Type | Description |
|---|---|
float
|
float The sum of |
Examples:
multiply3(a, b, c)
Multiply three numbers together.
This function is documented in a way that mkdocstrings can automatically extract and render.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
float
|
float The first number to multiply. |
required |
b
|
float
|
float The second number to multiply. |
required |
c
|
float
|
float The third number to multiply. |
required |
Returns:
| Type | Description |
|---|---|
float
|
float The product of |
Examples:
pctformat(value, decimals=2)
Format a number as a percentage string with specified decimal places.
Parameters: value (float): The numeric value to format. decimals (int): The number of decimal places to include.
Returns: str: The formatted percentage string.
Multiply 2 numbers and divide by a third.
This is a simple example function intended for use in documentation generated by mkdocstrings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m1
|
float
|
The first number to be multiplied. |
required |
m2
|
float
|
The second number to be multiplied. |
required |
d1
|
float
|
The number to divide the product of |
required |
Returns:
| Type | Description |
|---|---|
float
|
The product of |
Examples:
Calculate the n-th root of a number.
This function is documented in a way that mkdocstrings can automatically extract and render.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
float
|
The number to find the root of (the radicand). |
required |
b
|
float
|
The degree of the root (the index). |
required |
Returns:
| Type | Description |
|---|---|
float
|
The b-th root of a. |
Examples: