record_set_format_float

Function record_set_format_float 

Source
pub fn record_set_format_float(
    record: &mut Record,
    header: &Header,
    tag: &str,
    values: &[f32],
) -> Result<(), Error>
Expand description

Set a FORMAT float field on a record.

The values slice should be flattened: for a field with n values per sample and s samples, provide s * n values in sample-major order: [sample0_val0, sample0_val1, ..., sample1_val0, sample1_val1, ...]

Use format_missing_float() to represent missing values.

ยงErrors

Returns an error if:

  • The tag is not defined in the header
  • The tag is not a Float type