Number: Difference between revisions

From Goodblox Wiki
Jump to navigationJump to search
(created the page)
 
mNo edit summary
 
Line 5: Line 5:
Most of the time Lua doesn't mind if a number has decimal places or is negative. However certain Properties in GoodBlox require a whole number, or a positive number. In such cases an [[Integer]] will be asked for, instead of a number.
Most of the time Lua doesn't mind if a number has decimal places or is negative. However certain Properties in GoodBlox require a whole number, or a positive number. In such cases an [[Integer]] will be asked for, instead of a number.


Additionally, arithmetic operators can be applied to Numbers. Multiplication (*), Division (/), Subtraction (-), Addition (+), and Modulo (%). Comparative operators (<,>,>=,<=) can also be applied to numbers.
 
Additionally, arithmetic operators can be applied to Numbers. Multiplication (*), Division (/), Subtraction (-), Addition (+), and Modulo (%).
 
Comparative operators (<, >, >=, <=) can also be applied to numbers.


[[Category:Data Types]]
[[Category:Data Types]]

Latest revision as of 22:59, 21 September 2021


A Number in Lua is any number. That's it, really. Any number. It can have decimal places, be negative, whatever.

Most of the time Lua doesn't mind if a number has decimal places or is negative. However certain Properties in GoodBlox require a whole number, or a positive number. In such cases an Integer will be asked for, instead of a number.


Additionally, arithmetic operators can be applied to Numbers. Multiplication (*), Division (/), Subtraction (-), Addition (+), and Modulo (%).

Comparative operators (<, >, >=, <=) can also be applied to numbers.