How to use math functions

Hello, would someone be so kind as to explain to me what they are for and how to use these mathematical functions?

math.deg()
math.rad()
math.huge()
math.abs()

I was reading the docs and these were the only ones that I couldn’t learn well at all… :pray:

math.deg(x) turns value x into the angle from degrees into radians (so 360 will turn into 2pi)
math.rad(x) is the opposite of above (2pi will turn into 360 or 0)

math.huge() is really just a big number.

math.abs(x) returns the absolute value of a number. This is defined as the distance from zero. For example -1 is exactly 1 number away from 0 so it will return 1. 1 is also exactly 1 away from 0 so it will return 1. You can really think of it as just making x positive.

1 Like

Oh thank you so much now I have learned this :smiley:

1 Like