#Paper Posted February 1, 2011 Posted February 1, 2011 How i can transform a decimal num (23.000000502532) to a normal number?
proracer Posted February 1, 2011 Posted February 1, 2011 Never used this though but you can try this. function number () local x = 23.000000502532 outputChatBox("Round number of" ..x.. "is a" ..math.round(23.000000502532)) end addEventHandler("onResourceStart", getRootElement(), number) Here is all information: https://wiki.multitheftauto.com/wiki/Math.round
#Paper Posted February 2, 2011 Author Posted February 2, 2011 you could also use, math.floor. can you make an example?
proracer Posted February 2, 2011 Posted February 2, 2011 You can read a bit... http://lua-users.org/wiki/MathLibraryTutorial
Castillo Posted February 2, 2011 Posted February 2, 2011 uhm, i've used math.floor on getElementHealth to return a simple number, not 54.987498498789 and so on.
Castillo Posted February 2, 2011 Posted February 2, 2011 Ah, ok, i'm argentinian, i don't know everything
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