I cannot use math.pow(x,y) in Lua.
I don't know why, it says syntax error.
math.sin(f) and math.cos(f) works however.
Is there other alternative for math.pow() in Lua?
Lua's math.pow() function is deprecated as of release 5.3, as documented here. But it still exists in the latest release (up to and including 5.4.6).
If you're getting a syntax error, it's due to some other problem. Please update your question to show us the exact code that produces the error, as well as the error message.
In any case, you should use the built-in ^ exponentiation operator rather than the math.pow() function.
(Unlike C and some other languages, Lua uses ~ as the bitwise xor operator.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With