Skip to content

format

typescript
Mathf.Log(val, new_base)

class: Mathf

description

Returns the logarithm of a specified value in a specified base.

parameter

param_nametypedescription
valnumberThe specified value.
new_basenumber?The specified base.

return

typedescription
numberThe logarithm of x in the specified base.

code example

typescript
// The logarithm of x in the specified base.
let log = Mathf.log(8,2) //log=3