MCPcopy Create free account
hub / github.com/codecombat/codecombat / createLogFunc

Function createLogFunc

app/core/utils.js:719–719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717
718// f(x) = a log(b (x + c)) + d
719const createLogFunc = params => function (x) { if (x > 0) { return ((params.a || 1) * Math.log((params.b || 1) * (x + (params.c || 0)))) + (params.d || 0) } else { return 0 } }
720
721// f(x) = ax^b + c
722const createPowFunc = params => x => ((params.a || 1) * Math.pow(x, params.b || 1)) + (params.c || 0)

Callers

nothing calls this directly

Calls 1

logMethod · 0.80

Tested by

no test coverage detected