12p Posted December 8, 2010 Share Posted December 8, 2010 Is there some way on LUA to do that? Please help me.... thanks. Link to comment
wasd Posted December 9, 2010 Share Posted December 9, 2010 You could change your numbers to strings and then use string.format, Reffer to chapter 20 of Programming in lua by Roberto Ierusalimschy. Obviously there are less crude ways to do this, but I couldn't be bothered to find them because LUA restricts you to using the "number" type rather than giving you the conventional choice of ints/floats/doubles and so on. Link to comment
Antibird Posted December 9, 2010 Share Posted December 9, 2010 It's math.modf( x ), check the description here: http://www.lua.org/manual/5.1/manual.html#5.6 Link to comment
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