On sábado, 7 de setembro de 2013 15:41:37, Michael Jackson wrote:
> I'll plat the naive one here. What is the proper Qt API to byte swap a float
> or double? create a union? or some other such trick like that?

memcpy to a char buffer, byte swap.

DO NOT reload the swapped float or double into a variable of type float or 
double. After it's been swapped, it's just char[4] or char[8].

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to