Sometimes, it's useful to convert numbers, and for this there are four conversion functions. There are functions to convert between degrees and radians, to get the absolute value of an integer, and to round a floating point number to an integer.
- math.deg(v) converts a number from radians to degrees
- math.rad(v) converts a number from degrees to radians
- math.abs(v) returns the absolute value of the provided number
- math.tointeger(v): if v is convertible to an integer, an integer is returned, otherwise nil