Implement ReverseBytes for float

This commit is contained in:
Joshua Ashton 2020-08-07 04:09:49 +01:00
parent 68a2852043
commit f7c6f7ad97
1 changed files with 1 additions and 0 deletions

View File

@ -32,5 +32,6 @@ namespace Feather
template <typename J, typename T>
inline T ReverseBytesBitcast(T n) { return std::bit_cast<T>(ReverseBytes(std::bit_cast<J>(n))); }
inline float ReverseBytes(float n) { return ReverseBytesBitcast<uint32_t>(n); }
inline double ReverseBytes(double n) { return ReverseBytesBitcast<uint64_t>(n); }
}