1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-24 02:21:01 +03:00

📝 updated documentation for UBJSON functions

This commit is contained in:
Niels Lohmann
2018-01-22 23:23:17 +01:00
parent 3cca630836
commit 7eabb6ba36
10 changed files with 385 additions and 10 deletions

View File

@ -80,8 +80,8 @@ static float make_float(uint64_t f, int e)
}
uint64_t biased_exponent = (e == kDenormalExponent && (f & kHiddenBit) == 0)
? 0
: static_cast<uint64_t>(e + kExponentBias);
? 0
: static_cast<uint64_t>(e + kExponentBias);
uint64_t bits = (f & kSignificandMask) | (biased_exponent << kPhysicalSignificandSize);
return reinterpret_bits<float>(static_cast<uint32_t>(bits));
@ -132,8 +132,8 @@ static double make_double(uint64_t f, int e)
}
uint64_t biased_exponent = (e == kDenormalExponent && (f & kHiddenBit) == 0)
? 0
: static_cast<uint64_t>(e + kExponentBias);
? 0
: static_cast<uint64_t>(e + kExponentBias);
uint64_t bits = (f & kSignificandMask) | (biased_exponent << kPhysicalSignificandSize);
return reinterpret_bits<double>(bits);