Implement ReverseBytes for float
This commit is contained in:
parent
68a2852043
commit
f7c6f7ad97
|
@ -32,5 +32,6 @@ namespace Feather
|
||||||
template <typename J, typename T>
|
template <typename J, typename T>
|
||||||
inline T ReverseBytesBitcast(T n) { return std::bit_cast<T>(ReverseBytes(std::bit_cast<J>(n))); }
|
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); }
|
inline double ReverseBytes(double n) { return ReverseBytesBitcast<uint64_t>(n); }
|
||||||
}
|
}
|
Loading…
Reference in New Issue