Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

math.log (procNode)

The natural logarithm of a value, or its logarithm to a base when one is given, element by element. A value or a base at or below 0, or a base of 1, answers 0.

The log operation of the authoring surface, called through the Luau node on proc.fieldc.operators. Operands are numbers, vectors, Columns or Fields. When every operand is a plain number or vector the answer is the plain result, folded where the node cooks; otherwise the answer is a Field: a template over its operands that whatever reads it evaluates in one dispatch together with the chain around it. Nothing dispatches for this node alone. Over numbers and animated values the answer is an animated value: the operation at every time.

Inputs

  • a (Value, default 1). The value.
  • base (Value, optional). The base of the logarithm. Left unwired, the result is the natural logarithm.

Outputs

  • value. The logarithm.
local value = g.math.log(0) -- 0
local bits = g.math.log({ a = 8, base = 2 }) -- 3