ln

The natural logarithm ln(n) is the amount of time needed to reach a certain level of continuous growth, where n is the level reached. So if we want to find out how many time units we need to get 20 growth we would use ln(20) which returns 2.99 units of time to get that amount of growth.

 

Syntax:

ln(n);

 

Argument Type Description
n Real The input value.

 

Returns:

Real

 

Example:

alarm[0] = ln(age) * game_get_speed(gamespeed_fps);

The above code uses the natural logarithm of the value stored in the variable age to set an alarm.