ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:packshorts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
functions:packshorts [2017/03/19 18:09] – created korshunfunctions:packshorts [2017/03/19 18:10] korshun
Line 6: Line 6:
 Packs two short integers (-32768 to 32767) into one integer and returns the result. The short integers must be in the [-32768, 32767] range. Packs two short integers (-32768 to 32767) into one integer and returns the result. The short integers must be in the [-32768, 32767] range.
  
-The packed values can be retrieved using [[UnpackShorts]].+The packed values can be retrieved using [[UnpackShort]].
  
 <note tip> <note tip>
Line 17: Line 17:
 ===== Examples ===== ===== Examples =====
 <code> <code>
-// Pack rounded 2D actor positioninto a single integer. 
 int packed = PackShorts(12345, -15000); int packed = PackShorts(12345, -15000);
 UnpackShort1(packed) -> 12345 UnpackShort1(packed) -> 12345
functions/packshorts.txt · Last modified: 2017/04/17 20:48 by korshun