Difference between revisions of "Short Integer"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(global shorts are floats)
imported>JOG
(decimal places ARE rounded, and the precision problem doesn't apply to shorts)
Line 2: Line 2:


The highest bit is the sign, so the variable ranges from -2^15 (-32768) to 2^15-1 (32767)
The highest bit is the sign, so the variable ranges from -2^15 (-32768) to 2^15-1 (32767)
If you declare a Global short, it will actually be a float, and so will not round off decimal values like a short normally does.


[[Category:Variables]]
[[Category:Variables]]

Revision as of 10:47, 18 September 2006

Short is an integer format that uses 16 bit for data.

The highest bit is the sign, so the variable ranges from -2^15 (-32768) to 2^15-1 (32767)