Integer: Difference between revisions
>Blocco Whoa... How did I not see that the last time I checked this page? |
>Pighead10 No edit summary |
||
Line 18: | Line 18: | ||
In [[RBX.lua.IntValue (Object)|IntValues]], the lowest value it can hold is -2<sup>31</sup> or -2,147,483,648. The highest value it can hold is 2<sup>31</sup>-1, or 2,147,483,647. For the computer geeks out there, this is a 32-bit (or long) signed integer value. | In [[RBX.lua.IntValue (Object)|IntValues]], the lowest value it can hold is -2<sup>31</sup> or -2,147,483,648. The highest value it can hold is 2<sup>31</sup>-1, or 2,147,483,647. For the computer geeks out there, this is a 32-bit (or long) signed integer value. | ||
In Lua scripts, the variables that are just numbers are actually double precision floating point (or just 'double') numbers. For more information about this data type, look at the [[Number | Number data type page]]. | |||
{{Property| | {{Property| |
Revision as of 17:47, 27 January 2011
An Integer is any whole number (no decimal places) positive or negative.
5, 45213, 753, -4256, -842,
5.3 (No decimal places in Integers), 636.24
Integers can be used where you need to have negative numbers, but not a lot of decimal accuracy. Your numbers can't get very accurate (there is no "between" 1 and 2) but they can go negative.
In IntValues, the lowest value it can hold is -231 or -2,147,483,648. The highest value it can hold is 231-1, or 2,147,483,647. For the computer geeks out there, this is a 32-bit (or long) signed integer value.
In Lua scripts, the variables that are just numbers are actually double precision floating point (or just 'double') numbers. For more information about this data type, look at the Number data type page.