MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 2 | float to_float(int) |
| 3 | float to_float(string) |
| 4 | float to_float(float) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 5 | |
| 6 | (float)<value> |
| 7 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 8 | DESCRIPTION |
| 9 | Ints are expanded to floats, strings are converted up to the |
| 10 | first character that doesnt belong into a float. |
| 11 | Floats are just returned. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 12 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 13 | BUGS |
| 14 | The cast notation only works if the precise type of <value> |
| 15 | is known at compile-time. This will not be fixed - use the |
| 16 | function form instead. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 17 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 18 | SEE ALSO |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 19 | to_string(E), to_int(E), sscanf(E) |