Float

From QuakeQEWiki
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