Encode a positive integer as a 2-byte Uint16LE Uint8Array.
This method will return an incorrect result for values outside of the range 0 to 0xffff (65535). If applicable, applications should handle such cases prior to calling this method.
0
0xffff
65535
For an alternative overflow behavior, see numberToBinUint16LEClamped.
For the reverse, see binToNumberUint16LE.
the number to encode
Generated using TypeDoc
Encode a positive integer as a 2-byte Uint16LE Uint8Array.
This method will return an incorrect result for values outside of the range
0
to0xffff
(65535
). If applicable, applications should handle such cases prior to calling this method.For an alternative overflow behavior, see numberToBinUint16LEClamped.
For the reverse, see binToNumberUint16LE.