v0.13.8

math

namespaceavailable in: camelot

Status in wowlua

38 functions: 38 implemented, 0 recorded, 0 guessed.

Functions

functionwhat it doesstatus
absReturns the absolute value of a number.
not in Blizzard's documentation
implemented
acosReturns the arc cosine of a number, in radians. · by wowlua
not in Blizzard's documentation
implemented
asinReturns the arc sine of a number, in radians. · by wowlua
not in Blizzard's documentation
implemented
atanReturns the arc tangent of a number, in radians. Use math.atan2 to get the angle of a point in the right quadrant. · by wowlua
not in Blizzard's documentation
implemented
atan2Returns the arc tangent of y / x in radians, using the signs of both arguments to pick the quadrant. It takes y first, then x. · by wowlua
not in Blizzard's documentation
implemented
ceilReturns the ceiling of a number.
not in Blizzard's documentation
implemented
clampClamps a value to the inclusive range defined by the minimum and maximum values.
(value: number, minimum: number, maximum: number): number
implemented
cosReturns the cosine of an angle given in radians. · by wowlua
not in Blizzard's documentation
implemented
coshReturns the hyperbolic cosine of a number. · by wowlua
not in Blizzard's documentation
implemented
degConverts an angle from radians to degrees. · by wowlua
not in Blizzard's documentation
implemented
expReturns the value e<sup>x</sup>.
not in Blizzard's documentation
implemented
floorReturns the floor of a number.
not in Blizzard's documentation
implemented
fmodReturns the remainder of the division of x by y that rounds the result (quotient) towards zero.
not in Blizzard's documentation
implemented
frexpSplits a number into a mantissa m and an integer exponent e so that the number equals m * 2^e, with the absolute value of m in [0.5, 1) (or zero). · by wowlua
not in Blizzard's documentation
implemented
isfiniteReturns whether a value is finite.
(value: number): boolean
implemented
isinfReturns whether a value is positive or negative infinity.
(value: number): boolean
implemented
isnanReturns whether a value is NaN.
(value: number): boolean
implemented
ldexpReturns m * 2^e for a mantissa m and an integer exponent e; the inverse of math.frexp. · by wowlua
not in Blizzard's documentation
implemented
lerpLinearly interpolates between two values.
(startValue: number, endValue: number, amount: number): number
implemented
logReturns the natural logarithm of a number. In WoW's Lua 5.1 it takes no base argument; divide by math.log(base) for other bases. · by wowlua
not in Blizzard's documentation
implemented
log10Returns the base-10 logarithm of a number. · by wowlua
not in Blizzard's documentation
implemented
maxReturns the largest of its numeric arguments. · by wowlua
not in Blizzard's documentation
implemented
minReturns the smallest of its numeric arguments. · by wowlua
not in Blizzard's documentation
implemented
modfReturns the integer part and the fractional part of a number, both with the number's sign. · by wowlua
not in Blizzard's documentation
implemented
normalizeReturns the relative position of a value within a range, where the minimum maps to 0 and the maximum maps to 1.
(value: number, minimum: number, maximum: number): number
implemented
powReturns x raised to the power y; the same as x ^ y. · by wowlua
not in Blizzard's documentation
implemented
radConverts an angle from degrees to radians. · by wowlua
not in Blizzard's documentation
implemented
randomReturns a random number within the specified interval.
not in Blizzard's documentation
implemented
remapMaps a value from one range to the corresponding position in another range.
(value: number, sourceMinimum: number, sourceMaximum: number, destinationMinimum: number, destinationMaximum: number): number
implemented
roundRounds a value to the specified number of decimal places, with halfway values rounded away from zero.
(value: number, decimalPlaces: number): number
implemented
saturateClamps a value to the inclusive range [0, 1].
(value: number): number
implemented
signReturns -1 for negative values, 0 for zero, and 1 for positive values.
(value: number): number
implemented
sinComputes trigonometric functions.
not in Blizzard's documentation
implemented
sinhReturns the hyperbolic sine of a number. · by wowlua
not in Blizzard's documentation
implemented
sqrtReturns the square root of a number. · by wowlua
not in Blizzard's documentation
implemented
tanReturns the tangent of an angle given in radians. · by wowlua
not in Blizzard's documentation
implemented
tanhReturns the hyperbolic tangent of a number. · by wowlua
not in Blizzard's documentation
implemented
wrapWraps a value into the half-open range [minimum, maximum).
(value: number, minimum: number, maximum: number): number
implemented

"by wowlua": no one documents this function, so wowlua wrote the description from its name, signature and behaviour.

sources

Signatures, events and structures: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (LuaMathExtensions system, camelot 1.60.1). Descriptions: warcraft.wiki.gg's API pages, by its contributors, CC BY-SA 4.0 ↗; written by wowlua where no documentation describes the entry.