SC2Mapster.com
Maps
Assets
Teams
Authors
Forums
Wiki
Paste
Sign in
Register new account
SC2Mapster.com Wiki
SC2 API
/
Types
/
fixed
r7
Source
Markup:
== Galaxy Type == ##fixed## is a 32-bit fixed (as opposed to floating point) number where 19 bits are available in the integer portion, 12 bits are available in the fractional portion and 1 bit is giving the sign. In the Galaxy Editor GUI fixed is referred to as a real. * (2^^31^^ - 1) / 4096 ~= 524287.999755859375 is the greatest ##fixed## number. * -(2^^31^^ - 1) / 4096 ~= -524287.999755859375 is the least ##fixed## number. * 2^^-12^^ = 1 / 4096 ~= 0.000244140625, is the smallest non-zero ##fixed## number. <<code galaxy>> fixed f = 1.0; f = f / 4096.0; f = f * 4096.0; // f == 1.0 <</code>> **Note** There is a bug when using ##/=## and ##*=## <<code>> fixed f; f = 1; f *= 2; // f = 0.0004882812 f = 1; f /= 2; // f = 2048 f = 1; f /= 4; // f = 1024 <</code>> == Game File Type == * fixed32 ** Sign: 1 bit ** Integer part: 19 bits (524 288) ** Decimal part: 12 bits (4096) * fixed16 ** Sign: 1 bit ** Integer part: 5 bits (16) ** Decimal part: 11 bits (2048) * fixed8 ** Unsigned ** Integer part: 0 bit ** Decimal part: 8 bits (256)
Markup Type:
The type of markup for this entry.
Click here for details
.
BBCode
Markdown
Plain Text
WikiCreole