Skip to main content

parse_line_of_n_f64

Function parse_line_of_n_f64 

Source
pub fn parse_line_of_n_f64(line: &str, n: usize) -> Result<Vec<f64>, ParseError>
Expand description

Parses a line of whitespace-separated f64 values using fast-float2.

This is the hot-path parser for coordinate and velocity lines. It uses fast_float2::parse instead of str::parse::<f64>() for better throughput on the numeric-heavy atom data lines.

ยงArguments

  • line - A string slice representing a single line of data.
  • n - The exact number of f64 values expected on the line.