Difference between revisions of "Float"
Jump to navigation
Jump to search
(Created page with "Float is the numerical primitive in Quake-C. Like in many other languages 'float' is short for '[https://floating-point-gui.de/ floating point]'. Variables of type 'float' can be used as: * Floating point precision numbers ** <code>local float myVar = 3.14;</code> * Binary flag stores ** <code>local float flag = 2 | 8; // flag = 1010</code> * Boolean logic ** <code>local float isTall = height > 10; // isTall = 1</code> Category:Primitive") |
|||
Line 5: | Line 5: | ||
* Floating point precision numbers | * Floating point precision numbers | ||
** <code>local float myVar = 3.14;</code> | ** <code>local float myVar = 3.14;</code> | ||
* Binary flag stores | * [[Flag|Binary flag]] stores | ||
** <code>local float flag = 2 | 8; // flag = 1010</code> | ** <code>local float flag = 2 | 8; // flag = 1010</code> | ||
* Boolean logic | * Boolean logic |
Latest revision as of 07:17, 17 February 2022
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