03.07.2013 Views

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Paramètres<br />

x:Number - Un nombre ou une expression d'une valeur supérieure à 0.<br />

Renvoie<br />

Number - Le logarithme népérien <strong>du</strong> paramètre x.<br />

Exemple<br />

L'exemple suivant affiche le logarithme <strong>de</strong> trois valeurs numériques.<br />

trace(Math.log(0)); // output: -Infinity<br />

trace(Math.log(1)); // output: 0<br />

trace(Math.log(2)); // output: 0.693147180559945<br />

trace(Math.log(Math.E)); // output: 1<br />

LOG10E (propriété Math.LOG10E)<br />

statique publique LOG10E : Number<br />

Constante mathématique pour le logarithme en base 10 <strong>de</strong> la constante e (Math.E), exprimée<br />

sous la forme <strong>de</strong> log10e, d'une valeur approximative <strong>de</strong> 0,4342944819032518.<br />

La métho<strong>de</strong> Math.log() calcule le logarithme népérien d'un nombre. Multipliez le résultat <strong>de</strong><br />

Math.log() par Math.LOG10E pour obtenir le logarithme en base 10.<br />

Disponibilité : <strong>ActionScript</strong> 1.0 ; Flash Player 5<br />

Exemple<br />

Cet exemple indique comment obtenir le logarithme en base 10 d'un nombre :<br />

trace(Math.log(1000) * Math.LOG10E);<br />

// Output: 3<br />

LOG2E (propriété Math.LOG2E)<br />

statique publique LOG2E : Number<br />

Constante mathématique pour le logarithme en base 2 <strong>de</strong> la constante e (Math.E), exprimée<br />

sous la forme <strong>de</strong> log2e, d'une valeur approximative <strong>de</strong> 1,442695040888963387.<br />

La métho<strong>de</strong> Math.log calcule le logarithme népérien d'un nombre. Multipliez le résultat <strong>de</strong><br />

Math.log() par Math.LOG2E pour obtenir le logarithme en base 2.<br />

Disponibilité : <strong>ActionScript</strong> 1.0 ; Flash Player 5<br />

Math 777

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!