Skip to content
On this page

Module: game/formulas/types

Type Aliases

ConstantFormulaOptions

Ƭ ConstantFormulaOptions: Object

Type declaration

NameType
inputs[FormulaSource]

Defined in

profectus/src/game/formulas/types.d.ts:41


EvaluateFunction

Ƭ EvaluateFunction<T>: (this: InternalFormula<T>, ...inputs: GuardedFormulasToDecimals<T>) => DecimalSource

Type parameters

Name
T

Type declaration

▸ (this, ...inputs): DecimalSource

NameType
thisInternalFormula<T>
...inputsGuardedFormulasToDecimals<T>

Defined in

profectus/src/game/formulas/types.d.ts:20


FormulaOptions

Ƭ FormulaOptions<T>: VariableFormulaOptions | ConstantFormulaOptions | GeneralFormulaOptions<T>

Type parameters

NameType
Textends [FormulaSource] | FormulaSource[]

Defined in

profectus/src/game/formulas/types.d.ts:52


FormulaSource

Ƭ FormulaSource: ProcessedComputable<DecimalSource> | GenericFormula

Defined in

profectus/src/game/formulas/types.d.ts:7


FormulasToDecimals

Ƭ FormulasToDecimals<T>: { [K in keyof T]: DecimalSource }

Type parameters

NameType
Textends FormulaSource[]

Defined in

profectus/src/game/formulas/types.d.ts:71


GeneralFormulaOptions

Ƭ GeneralFormulaOptions<T>: Object

Type parameters

NameType
Textends [FormulaSource] | FormulaSource[]

Type declaration

NameType
applySubstitution?SubstitutionFunction<T>
evaluateEvaluateFunction<T>
inputsT
integrate?IntegrateFunction<T>
integrateInner?IntegrateFunction<T>
invert?InvertFunction<T>

Defined in

profectus/src/game/formulas/types.d.ts:44


GenericFormula

Ƭ GenericFormula: InternalFormula<any>

Defined in

profectus/src/game/formulas/types.d.ts:6


GuardedFormulasToDecimals

Ƭ GuardedFormulasToDecimals<T>: TupleGuard<T>

Type parameters

NameType
Textends FormulaSource[]

Defined in

profectus/src/game/formulas/types.d.ts:76


IntegrableFormula

Ƭ IntegrableFormula: InvertibleFormula & { calculateConstantOfIntegration: NonNullable<GenericFormula["calculateConstantOfIntegration"]> ; evaluateIntegral: NonNullable<GenericFormula["evaluateIntegral"]> ; getIntegralFormula: NonNullable<GenericFormula["getIntegralFormula"]> }

Defined in

profectus/src/game/formulas/types.d.ts:11


IntegrateFunction

Ƭ IntegrateFunction<T>: (this: InternalFormula<T>, stack: SubstitutionStack | undefined, ...inputs: T) => GenericFormula

Type parameters

Name
T

Type declaration

▸ (this, stack, ...inputs): GenericFormula

NameType
thisInternalFormula<T>
stackSubstitutionStack | undefined
...inputsT

Defined in

profectus/src/game/formulas/types.d.ts:29


InternalFormulaProperties

Ƭ InternalFormulaProperties<T>: Object

Type parameters

NameType
Textends [FormulaSource] | FormulaSource[]

Type declaration

NameType
applySubstitution?SubstitutionFunction<T>
innermostVariable?ProcessedComputable<DecimalSource>
inputsT
internalEvaluate?EvaluateFunction<T>
internalIntegrate?IntegrateFunction<T>
internalIntegrateInner?IntegrateFunction<T>
internalInvert?InvertFunction<T>
internalVariablesnumber

Defined in

profectus/src/game/formulas/types.d.ts:57


InvertFunction

Ƭ InvertFunction<T>: (this: InternalFormula<T>, value: DecimalSource, ...inputs: T) => DecimalSource

Type parameters

Name
T

Type declaration

▸ (this, value, ...inputs): DecimalSource

NameType
thisInternalFormula<T>
valueDecimalSource
...inputsT

Defined in

profectus/src/game/formulas/types.d.ts:24


InvertibleFormula

Ƭ InvertibleFormula: GenericFormula & { invert: NonNullable<GenericFormula["invert"]> }

Defined in

profectus/src/game/formulas/types.d.ts:8


InvertibleIntegralFormula

Ƭ InvertibleIntegralFormula: IntegrableFormula & { invertIntegral: NonNullable<GenericFormula["invertIntegral"]> }

Defined in

profectus/src/game/formulas/types.d.ts:16


SubstitutionFunction

Ƭ SubstitutionFunction<T>: (this: InternalFormula<T>, variable: GenericFormula, ...inputs: T) => GenericFormula

Type parameters

Name
T

Type declaration

▸ (this, variable, ...inputs): GenericFormula

NameType
thisInternalFormula<T>
variableGenericFormula
...inputsT

Defined in

profectus/src/game/formulas/types.d.ts:34


SubstitutionStack

Ƭ SubstitutionStack: (value: GenericFormula) => GenericFormula[] | undefined

Defined in

profectus/src/game/formulas/types.d.ts:68


TupleGuard

Ƭ TupleGuard<T>: T extends any[] ? FormulasToDecimals<T> : never

Type parameters

NameType
Textends any[]

Defined in

profectus/src/game/formulas/types.d.ts:75


VariableFormulaOptions

Ƭ VariableFormulaOptions: Object

Type declaration

NameType
variableProcessedComputable<DecimalSource>

Defined in

profectus/src/game/formulas/types.d.ts:40