« Introduction au Lua/Fonctions Math » : différence entre les versions

Contenu supprimé Contenu ajouté
Youni Verciti (discussion | contributions)
Youni Verciti (discussion | contributions)
Ligne 276 :
 
== Comprendre le nouveau script ==
 
To understand your Lua script:
# <code>math.abs(x)</code> returnsretourne thela absolutevaleur valueabsolue ofde <code>x</code> returns .
# <code>math.acos(x)</code> returns theretourne l'arc cosinecosinus ofselon <code>x</code> (givendonné inen radians).
# <code>math.asin(x)</code> returns theretourne l'arc sinesinus ofselon <code>x</code> (givendonné inen radians).
# <code>math.atan(x)</code> returnsretourne thela arctangente tangentde l'arc ofselon <code>x</code> (givendonné inen radians).
# <code>math.atan2(y, x)</code> returnsretourne thela tangeante de l'arc tangent ofselon <code>y/x</code> (givendonné inen radians), using the signs of both parameters to find the quadrant of the result...
# <code>math.ceil(x)</code> returnsretourne thele smallestplus integerpetit nombre entier ...larger than... orou equalégal toà <code>x</code>.
# <code>math.cos(x)</code> returnsretourne thele cosinecosinus ofde <code>x</code> (givendonné inen radians).
# <code>math.cosh(x)</code> returnsretourne thele hyperboliccosinus cosinehyperbolique ofde <code>x</code>.
# <code>math.deg(x)</code> returnsretourne thela valeur en degrés de l'angle <code>x</code> (givendonné inen radians) in degrees.
# <code>math.exp(x)</code> returnsretourne thela valuevaleur <code>e^x</code>.
# <code>math.floor(x)</code> returnsretourne thele largestplus integergrand smallernombre thanentier orqui equalsoit toinférieur ou égal à o <code>x</code>.
# <code>math.fmod2(x, y)</code> returnsretourne thele remainderreste ofde thela division ofde <code>x</code> bypar <code>y</code> ...that rounds the quotient towards zero...
# <code>math.frexp(x)</code> returnsretourne twodeux valuesvaleurs m andet e suchtel thatque <code>x</code> = m times 2^e, e isest anun integerentier, andet thela absolutevaleur valueabsolue ofde m isest in the rangeentre [0.5, 1)
# <code>math.huge</code> returnsretourne thela valuevaleur representingreprésentant positivel'infini positif infinity; larger than orsuperieur equalou toégal anyà othertoute numericalvaleur valuenumérique.
# <code>math.ldexp(m, e)</code> returnsretourne <code>m</code> times <code>2^e</code> (<code>e</code> shoulddevrait beêtre anun integerentier)...
# <code>math.log(x)</code> returnsretourne thele naturallogarithme logarithmnaturel ofde <code>x</code>.
# <code>math.log10(x)</code> returnsreourne thele logarithme décimal (base-10 logarithm) ofde <code>x</code>.
# <code>math.max(x, y)</code> returns the ma<code>x</code>imum value among its arguments.
# <code>math.min(x, y)</code> returns the minimum value among its arguments.