float_to_255
Converts a float value between 0 and 1 (inclusive) to an integer between 0 and 255 (inclusive).
def float_to_255(
c: float
) - > int
Converts a float value between 0 and 1 (inclusive) to an integer between 0 and 255 (inclusive).
Parameters
| Name | Type | Description |
|---|---|---|
| c | float | The float value to be converted. Must be between 0 and 1 (inclusive). |
Returns
| Type | Description |
|---|---|
int | The integer equivalent of the given float value rounded to the nearest whole number. |