MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / f2Data

Function f2Data

src/types.cpp:414–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414size_t f2Data(byte* buf, float f, ByteOrder byteOrder) {
415 // This algorithm assumes that the internal representation of the float
416 // type is the 4-byte IEEE 754 binary32 format, which is common but not
417 // required by the C++ standard.
418 union {
419 uint32_t ul_;
420 float f_;
421 } u;
422 u.f_ = f;
423 return ul2Data(buf, u.ul_, byteOrder);
424}
425
426size_t d2Data(byte* buf, double d, ByteOrder byteOrder) {
427 // This algorithm assumes that the internal representation of the double

Callers 1

toDataFunction · 0.85

Calls 1

ul2DataFunction · 0.85

Tested by

no test coverage detected