ReferenceScript nodesMath › Number
Log
Which power of the base makes x (0 for a base of 0 or less).
ƒLog
A10Result
Base1
Inputs
| Pin | Type | Starts at | Notes |
|---|---|---|---|
Ax | number | 10 | – |
Basebase | number | 1 | – |
Outputs
| Pin | Type |
|---|---|
Resultout | number |
The code it becomes
The graph below written as a script would write it.
// On Scene Startscene.log(((function (x, b) { if (b <= 0) return 0; const r = Math.log(x) / Math.log(b); return isFinite(r) ? r : 0; })(10, 1)));In a graph
◆On Scene Start
ƒLog
A10Result
Base1
ƒPrint
In Text
The node with what starts it and Print to show what it gives, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.