Hey, so I wanna learn all the math functions in Roblox Lua
What I already know:
Math.
Random
Rad
Rad
Ceil
Abs
Deg
Sqrt squares a number?
Clamp clamps two numbers?
if you can explain the other functions, I’d appreciate that
Hey, so I wanna learn all the math functions in Roblox Lua
What I already know:
Math.
Random
Rad
Rad
Ceil
Abs
Deg
Sqrt squares a number?
Clamp clamps two numbers?
if you can explain the other functions, I’d appreciate that
Here is a full list provided by Roblox
https://developer.roblox.com/en-us/api-reference/lua-docs/math
Thanks I couldn’t find it xD I’ll make sure to read it!
sqrt(x)
gets the square root of a number, so like math.sqrt(16)
will return 4.
math.clamp(x, min, max)
returns a given number within the range you specify, so math.clamp(50, 0, 30)
will return 30, math.clamp(20, 0, 30)
will return 20 and math.clamp(-103, 0, 30)
will return 0.