Fury Posted February 14, 2014 Posted February 14, 2014 hey there, i have a list something like that; 2132.1 1615.121 564165.122 .. .. what i want is to delete numbers after the dot "." so it'll be something like this; 2132 1615 564165 .. .. i can find the data's who have dots in it with string.find, but how can i delete them? the number's count after the dot is different for each data. so thanks for helping from now.
ixjf Posted February 14, 2014 Posted February 14, 2014 You can use math.ceil or math.floor to round numbers.
Fury Posted February 14, 2014 Author Posted February 14, 2014 You can use math.ceil or math.floor to round numbers. thank you, math.ceil works for me.
Moderators Citizen Posted February 14, 2014 Moderators Posted February 14, 2014 You can use math.ceil or math.floor to round numbers. thank you, math.ceil works for me. Both would work, but math.ceil will round up the float number and math.floor will round it down: math.floor(5.2) --> 5 math.floor(5.9) --> 5 math.ceil(5.2) --> 6 math.ceil(5.9) --> 6 Regards, Citizen
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now