KrSoFA Posted August 22, 2012 Posted August 22, 2012 Hello, I've wrote a function for negative value , you find it useful: https://wiki.multitheftauto.com/wiki/math.neg Greetings
Guest Guest4401 Posted August 22, 2012 Posted August 22, 2012 I guess using "-" before the number is pretty much better rather than using a function to make it negative.
_Dark_ Posted August 22, 2012 Posted August 22, 2012 . . . Useless function. local a = 10 local b = -10 a, b = -a, -b -- a = -10, b = 10. #define if while#define TRUE FALSE// problems?
Anderl Posted August 22, 2012 Posted August 22, 2012 I now have to agree with you, this is very useless. Just write "-" before the number and it's done. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
robhol Posted August 22, 2012 Posted August 22, 2012 To be fair, simple negation is not what it does. However, it can be written more succinctly as "-math.abs(x)" Do NOT PM ME for help unless invited. - New MTA Script Editor Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.
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