Difference between revisions of "Bit.bswap"
From GiderosMobile
Line 6: | Line 6: | ||
(number) = bit.bswap(x) | (number) = bit.bswap(x) | ||
</source> | </source> | ||
− | '''x''': (number) number to swap | + | === Parameters === |
+ | '''x''': (number) number to swap <br/> | ||
+ | === Return values === | ||
'''Returns''' (number) Swapped bytes<br/> | '''Returns''' (number) Swapped bytes<br/> |
Revision as of 10:45, 23 August 2018
Available since: Gideros 2013.09
Description
Swaps the bytes of its argument and returns it. This can be used to convert little-endian 32 bit numbers to big-endian 32 bit numbers or vice versa.
(number) = bit.bswap(x)
Parameters
x: (number) number to swap
Return values
Returns (number) Swapped bytes