serializeFloat method

void serializeFloat(
  1. double value
)

Serializes a float value, narrowing the f64 value to binary32.

Does not reject. Every finite f64 has a defined nearest binary32 under IEEE-754, so this narrowing is a specified rounding rather than a wrap, and it matches canon's own float-typed entry point. See the class doc for why the integer widths reject where this one rounds.

Implementation

void serializeFloat(double value) {
  _checkState();
  final rc = bindings.zd_serializer_serialize_float(_loanMut().cast(), value);
  if (rc != 0) throw ZenohException('Failed to serialize float', rc);
}