Document the numeric value returned by string parsing for floats

This commit is contained in:
Matthew Woodcraft 2022-04-16 22:00:37 +01:00
parent 6fa061c5f9
commit 16c81fa9a6

View File

@ -143,8 +143,10 @@ impl FromStr for $t {
/// # Return value
///
/// `Err(ParseFloatError)` if the string did not represent a valid
/// number. Otherwise, `Ok(n)` where `n` is the floating-point
/// number represented by `src`.
/// number. Otherwise, `Ok(n)` where `n` is the closest
/// representable floating-point number to the number represented
/// by `src` (following the same rules for rounding as for the
/// results of primitive operations).
#[inline]
fn from_str(src: &str) -> Result<Self, ParseFloatError> {
dec2flt(src)