import{_ase,caso,oast,Nasc}from"./chunks/framework.0799945b.js";consth=JSON.parse('{"title":"Module: game/formulas/formulas","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/game/formulas/formulas.md","lastUpdated":null}'),d={name:"api/modules/game/formulas/formulas.md"},a=c('<h1id="module-game-formulas-formulas"tabindex="-1">Module:game/formulas/formulas<aclass="header-anchor"href="#module-game-formulas-formulas"aria-label="Permalink to "Module: game/formulas/formulas""></a></h1><h2id="classes"tabindex="-1">Classes<aclass="header-anchor"href="#classes"aria-label="Permalinkto"Classes""></a></h2><h3id="default"tabindex="-1">default<aclass="header-anchor"href="#default"aria-label="Permalinkto"default""></a></h3><p>•<strong>default</strong><<code>T</code>>:<code>Object</code></p><p>Aclassthatcanbeusedforcost/goalfunctions.Itcanbeevaluatedsimilartoacostfunction,butalsoprovidesextrafeaturesforsupportedformulas.Forexample,alotofmathfunctionscanbeinverted.Typically,theuseoftheseextrafeaturesistosupportcost/goalfunctionsthathavemultiplelevelspurchased/completedatonceefficiently.</p><p><strong><code>See</code></strong></p><ul><li><ahref="./formulas#calculatemaxaffordable">calculateMaxAffordable</a></li><li><ahref="./../requirements#createcostrequirement">createCostRequirement</a></li></ul><h4id="type-parameters"tabindex="-1">Typeparameters<aclass="header-anchor"href="#type-parameters"aria-label="Permalinkto"Typeparameters""></a></h4><table><thead><tr><thstyle="text-align:left;">Name</th><thstyle="text-align:left;">Type</th></tr></thead><tbody><tr><tdstyle="text-align:left;"><code>T</code></td><tdstyle="text-align:left;">extends[<ahref="./types#formulasource"><code>FormulaSource</code></a>]|<ahref="./types#formulasource"><code>FormulaSource</code></a>[]</td></tr></tbody></table><table><thead><tr><thstyle="text-align:left;">Name</th><thstyle="text-align:left;">Type</th></tr></thead><tbody><tr><tdstyle="text-align:left;"><code>constructor</code></td><tdstyle="text-align:left;"><T>(<code>options</code>:<ahref="./types#formulaoptions"><code>FormulaOptions</code></a><<code>T</code>>)=><ahref="./formulas#default"><code>default</code></a><<code>T</code>></td></tr><tr><tdstyle="text-align:left;"><code>applySubstitution</code></td><tdstyle="text-align:left;"><code>undefined</code>|<ahref="./types#substitutionfunction"><code>SubstitutionFunction</code></a><<code>T</code>></td></tr><tr><tdstyle="text-align:left;"><code>divide</code></td><tdstyle="text-align:left;"><T>(<code>this</code>:<code>T</code>,<code>value</code>:<ahref="./types#formulasource"><code>FormulaSource</code></a>)=><code>T</code><T>(<code>this</code>:<ahref="./types#genericformula"><code>GenericFormula</code></a>,<code>value</code>:<code>T</code>)=><code>T</code>(<code>this</code>:<ahref="./types#genericformula"><code>GenericFormula</code></a>,<code>value</code>:<ahref="./types#formulasource"><code>FormulaSource</code></a>)=><ahref="./types#genericformula"><code>GenericFormula</code></a></td></tr><tr><tdstyle="text-align:left;"><code>divideBy</code></td><tdstyle="text-align:left;"><T>(<code>this</code>:<code>T</code>,<code>value</code>:<ahref="./types#formulasource"><code>FormulaSource</code></a>)=><code>T</code><T>(<code>this</code>:<ahref="./types#genericformula"><code>GenericFormula</code></a>,<code>value</code>:<code>T</code>)=><code>T</code>(<code>this</code>:<ahref="./types#genericformula"><code>GenericFormula</code></a>,<code>value</code>:<ahref="./types#formulasource"><code>FormulaSource</code></a>)=><ahref="./types#genericformula"><code>GenericFormula</code></a></td></tr><tr><tdstyle="text-align:left;"><code>dividedBy</code></td><tdstyle="text-align:left;"><T>(<code>this</code>:<code>T</code>,<code>value</code>:<ahref=".