Math.log( ) Method

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
Math.log( ) Method Flash 5; can be used when exporting Flash 4 movies

compute the natural logarithm of a number
Math.log(x)

Arguments

x

A positive integer.

Returns

The natural logarithm of x.

Description

The log( ) method calculates the natural logarithm (i.e., the base-e logarithm) of a number. See the following Example to calculate the base-10 logarithm.

Example

trace (Math.log(Math.E));   // Displays: 1     // Compute the base-10 logarithm of a number function log10 (x) {   return (Math.log(x) / Math.log(10)); }


    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net