What’s the easiest and best way to identify and number and check if it’s a integer or a double?
Example: How do I check if 4.5 ends with a .5? [import]uid: 24111 topic_id: 18538 reply_id: 318538[/import]
What’s the easiest and best way to identify and number and check if it’s a integer or a double?
Example: How do I check if 4.5 ends with a .5? [import]uid: 24111 topic_id: 18538 reply_id: 318538[/import]
Figured out a simple way to do it just after posting the thread:
number = 4
if math.floor(number) == number then
print("Integer!")
else
print("Double!")
end
But is it an even better way to do this? [import]uid: 24111 topic_id: 18538 reply_id: 71146[/import]