mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add descriptive comment to mrb_read_float function
This commit adds a descriptive comment at the beginning of the `mrb_read_float` function in `src/readfloat.c`. The comment explains the function's purpose, its parameters (`str`, `endp`, `fp`), and its return value (`TRUE` or `FALSE`). This improves code readability and understanding.
This commit is contained in:
@@ -5,6 +5,17 @@
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
/*
|
||||
** Parses a string representation of a floating-point number.
|
||||
**
|
||||
** @param str The input string to parse.
|
||||
** @param endp A pointer to a char* that will be updated to point to the
|
||||
** character in str after the last character used in the
|
||||
** conversion. Can be NULL.
|
||||
** @param fp A pointer to a double that will be set to the parsed
|
||||
** floating-point number.
|
||||
** @return TRUE if a float is successfully parsed, FALSE otherwise.
|
||||
*/
|
||||
MRB_API mrb_bool
|
||||
mrb_read_float(const char *str, char **endp, double *fp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user