Garry's Mod Wiki

math.log

  number math.log( number x, number base = e )

Description

With one argument, return the natural logarithm of x (to base e).

With two arguments, return the logarithm of x to the given base, calculated as log(x)/log(base).

Arguments

1 number x
The value to get the base from exponent from.
2 number base = e
The logarithmic base.

Returns

1 number
Logarithm of x to the given base