Float

From QuakeQEWiki
Revision as of 07:17, 17 February 2022 by Teamred (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Float is the numerical primitive in Quake-C. Like in many other languages 'float' is short for 'floating point'.

Variables of type 'float' can be used as:

  • Floating point precision numbers
    • local float myVar = 3.14;
  • Binary flag stores
    • local float flag = 2 | 8; // flag = 1010
  • Boolean logic
    • local float isTall = height > 10; // isTall = 1