How to swap a double in Objective-C -
i'm trying read double file. need swap it. nsswaplittledoubletohost(nsswappeddouble x)
requires nsswappeddouble
. nsswapdouble()
requires nsswappeddouble
well.
nsswappeddouble doubleswap = normaldouble;
doesnt work.
how convert double nsswappeddouble?
to convert double nsswappeddouble can use nsconverthostdoubletoswapped
per documentation.
however, if want swap double
can call nsswaphostdoubletobig
or nsswaphostdoubletolittle
directly (both take double
parameter).
Comments
Post a Comment