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

Function createLinearFunc

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

Source from the content-addressed store, hash-verified

711
712// f(x) = ax + b
713const createLinearFunc = params => x => ((params.a || 1) * x) + (params.b || 0)
714
715// f(x) = ax² + bx + c
716const createQuadraticFunc = params => x => ((params.a || 1) * x * x) + ((params.b || 1) * x) + (params.c || 0)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected