Log - Math

Revision as of 20:39, 13 July 2023 by Ingvion (talk | contribs) (→‎Examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SKSE Member of: Math Script

Returns natural logarithm of passed argument as float value.

SyntaxEdit

float Function Log(float arg1) global native

ParametersEdit

  • arg1: The float value to calculate natural logarithm from.

Return ValueEdit

The natural logarithm of arg1.

ExamplesEdit

float lnNum = Math.Log(5.89) ; lnNum ≈ 1.773256
;/ there's no function that returns a simple logarithm, but you can easily calculate it
   by multiplying this function's return value by 0.434294 (logarithm of Euler's number) /;

float logNum = (Math.Log(5.89)) * 0.434294 ; logNum ≈ 0.770114 (keep in mind, the result is not 100% accurate)

NotesEdit

See AlsoEdit