import{_ as e,c as t,o as a,N as r}from"./chunks/framework.0799945b.js";const p=JSON.parse('{"title":"Class: default","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/classes/game/formulas/formulas.default.md","lastUpdated":null}'),o={name:"api/classes/game/formulas/formulas.default.md"},l=r('

Class: default<T>

game/formulas/formulas.default

A class that can be used for cost/goal functions. It can be evaluated similar to a cost function, but also provides extra features for supported formulas. For example, a lot of math functions can be inverted. Typically, the use of these extra features is to support cost/goal functions that have multiple levels purchased/completed at once efficiently.

See

Type parameters

NameType
Textends [FormulaSource] | FormulaSource[]

Constructors

constructor

new default<T>(options)

Type parameters

NameType
Textends [FormulaSource] | FormulaSource[]

Parameters

NameType
optionsFormulaOptions<T>

Defined in

profectus/src/game/formulas/formulas.ts:59

Properties

applySubstitution

Private Readonly applySubstitution: undefined | SubstitutionFunction<T>

Defined in

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


divide

divide: <T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula

Type declaration

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
valueFormulaSource
Returns

T

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisGenericFormula
valueT
Returns

T

▸ (this, value): GenericFormula

Parameters
NameType
thisGenericFormula
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1025


divideBy

divideBy: <T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula

Type declaration

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
valueFormulaSource
Returns

T

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisGenericFormula
valueT
Returns

T

▸ (this, value): GenericFormula

Parameters
NameType
thisGenericFormula
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1026


dividedBy

dividedBy: <T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula

Type declaration

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
valueFormulaSource
Returns

T

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisGenericFormula
valueT
Returns

T

▸ (this, value): GenericFormula

Parameters
NameType
thisGenericFormula
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1027


innermostVariable

Readonly innermostVariable: undefined | ProcessedComputable<DecimalSource>

Defined in

profectus/src/game/formulas/formulas.ts:55


inputs

Readonly inputs: T

Defined in

profectus/src/game/formulas/formulas.ts:46


integralFormula

Private integralFormula: undefined | GenericFormula

Defined in

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


internalEvaluate

Private Readonly internalEvaluate: undefined | EvaluateFunction<T>

Defined in

profectus/src/game/formulas/formulas.ts:48


internalIntegrate

Private Readonly internalIntegrate: undefined | IntegrateFunction<T>

Defined in

profectus/src/game/formulas/formulas.ts:50


internalIntegrateInner

Private Readonly internalIntegrateInner: undefined | IntegrateFunction<T>

Defined in

profectus/src/game/formulas/formulas.ts:51


internalInvert

Private Readonly internalInvert: undefined | InvertFunction<T>

Defined in

profectus/src/game/formulas/formulas.ts:49


internalVariables

Private Readonly internalVariables: number

Defined in

profectus/src/game/formulas/formulas.ts:53


logarithm

logarithm: <T>(this: T, value: FormulaSource) => T<T>(this: FormulaSource, value: T) => T(this: FormulaSource, value: FormulaSource) => GenericFormula

Type declaration

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
valueFormulaSource
Returns

T

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisFormulaSource
valueT
Returns

T

▸ (this, value): GenericFormula

Parameters
NameType
thisFormulaSource
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1085


minus

minus: <T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula

Type declaration

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
valueFormulaSource
Returns

T

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisGenericFormula
valueT
Returns

T

▸ (this, value): GenericFormula

Parameters
NameType
thisGenericFormula
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1008


multiply

multiply: <T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula

Type declaration

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
valueFormulaSource
Returns

T

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisGenericFormula
valueT
Returns

T

▸ (this, value): GenericFormula

Parameters
NameType
thisGenericFormula
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1016


negate

negate: <T>(this: T) => T(this: GenericFormula) => GenericFormula

Type declaration

▸ <T>(this): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
Returns

T

▸ (this): GenericFormula

Parameters
NameType
thisGenericFormula
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:969


negated

negated: <T>(this: T) => T(this: GenericFormula) => GenericFormula

Type declaration

▸ <T>(this): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
Returns

T

▸ (this): GenericFormula

Parameters
NameType
thisGenericFormula
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:970


plus

plus: <T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula

Type declaration

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
valueFormulaSource
Returns

T

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisGenericFormula
valueT
Returns

T

▸ (this, value): GenericFormula

Parameters
NameType
thisGenericFormula
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:999


reciprocal

reciprocal: <T>(this: T) => T(this: FormulaSource) => GenericFormula

Type declaration

▸ <T>(this): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
Returns

T

▸ (this): GenericFormula

Parameters
NameType
thisFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1034


reciprocate

reciprocate: <T>(this: T) => T(this: FormulaSource) => GenericFormula

Type declaration

▸ <T>(this): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
Returns

T

▸ (this): GenericFormula

Parameters
NameType
thisFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1035


sgn

sgn: () => GenericFormula

Type declaration

▸ (): GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:975


subtract

subtract: <T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula

Type declaration

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
valueFormulaSource
Returns

T

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisGenericFormula
valueT
Returns

T

▸ (this, value): GenericFormula

Parameters
NameType
thisGenericFormula
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1007


times

times: <T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula

Type declaration

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisT
valueFormulaSource
Returns

T

▸ <T>(this, value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
thisGenericFormula
valueT
Returns

T

▸ (this, value): GenericFormula

Parameters
NameType
thisGenericFormula
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1017


clampMax

Static clampMax: (value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>

Type declaration

▸ (value, other): default<[FormulaSource, FormulaSource]>

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:533


clampMin

Static clampMin: (value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>

Type declaration

▸ (value, other): default<[FormulaSource, FormulaSource]>

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:532


divide

Static divide: <T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => GenericFormula = Formula.div

Type declaration

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
otherFormulaSource
Returns

T

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueFormulaSource
otherT
Returns

T

▸ (value, other): GenericFormula

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:510


divideBy

Static divideBy: <T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => GenericFormula = Formula.div

Type declaration

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
otherFormulaSource
Returns

T

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueFormulaSource
otherT
Returns

T

▸ (value, other): GenericFormula

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:511


dividedBy

Static dividedBy: <T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => GenericFormula = Formula.div

Type declaration

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
otherFormulaSource
Returns

T

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueFormulaSource
otherT
Returns

T

▸ (value, other): GenericFormula

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:512


logarithm

Static logarithm: <T>(value: T, base: FormulaSource) => T<T>(value: FormulaSource, base: T) => T(value: FormulaSource, base: FormulaSource) => GenericFormula = Formula.log

Type declaration

▸ <T>(value, base): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
baseFormulaSource
Returns

T

▸ <T>(value, base): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueFormulaSource
baseT
Returns

T

▸ (value, base): GenericFormula

Parameters
NameType
valueFormulaSource
baseFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:577


max

Static max: (value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>

Type declaration

▸ (value, other): default<[FormulaSource, FormulaSource]>

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:528


maxabs

Static maxabs: (value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>

Type declaration

▸ (value, other): default<[FormulaSource, FormulaSource]>

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:531


min

Static min: (value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>

Type declaration

▸ (value, other): default<[FormulaSource, FormulaSource]>

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:529


minabs

Static minabs: (value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>

Type declaration

▸ (value, other): default<[FormulaSource, FormulaSource]>

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:530


minus

Static minus: <T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => GenericFormula = Formula.sub

Type declaration

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
otherFormulaSource
Returns

T

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueFormulaSource
otherT
Returns

T

▸ (value, other): GenericFormula

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:481


multiply

Static multiply: <T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => GenericFormula = Formula.mul

Type declaration

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
otherFormulaSource
Returns

T

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueFormulaSource
otherT
Returns

T

▸ (value, other): GenericFormula

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:495


negate

Static negate: <T>(value: T) => T(value: FormulaSource) => GenericFormula = Formula.neg

Type declaration

▸ <T>(value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
Returns

T

▸ (value): GenericFormula

Parameters
NameType
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:428


negated

Static negated: <T>(value: T) => T(value: FormulaSource) => GenericFormula = Formula.neg

Type declaration

▸ <T>(value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
Returns

T

▸ (value): GenericFormula

Parameters
NameType
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:429


plus

Static plus: <T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => GenericFormula = Formula.add

Type declaration

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
otherFormulaSource
Returns

T

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueFormulaSource
otherT
Returns

T

▸ (value, other): GenericFormula

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:465


reciprocal

Static reciprocal: <T>(value: T) => T(value: FormulaSource) => GenericFormula = Formula.recip

Type declaration

▸ <T>(value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
Returns

T

▸ (value): GenericFormula

Parameters
NameType
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:524


reciprocate

Static reciprocate: <T>(value: T) => T(value: FormulaSource) => GenericFormula = Formula.recip

Type declaration

▸ <T>(value): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
Returns

T

▸ (value): GenericFormula

Parameters
NameType
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:525


sgn

Static sgn: (value: FormulaSource) => GenericFormula = Formula.sign

Type declaration

▸ (value): GenericFormula

Parameters
NameType
valueFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:434


subtract

Static subtract: <T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => GenericFormula = Formula.sub

Type declaration

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
otherFormulaSource
Returns

T

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueFormulaSource
otherT
Returns

T

▸ (value, other): GenericFormula

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:480


times

Static times: <T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => GenericFormula = Formula.mul

Type declaration

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueT
otherFormulaSource
Returns

T

▸ <T>(value, other): T

Type parameters
NameType
Textends default<any, T>
Parameters
NameType
valueFormulaSource
otherT
Returns

T

▸ (value, other): GenericFormula

Parameters
NameType
valueFormulaSource
otherFormulaSource
Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:496

Methods

abs

abs(): GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:960


absLog10

absLog10(): GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1069


acos

acos<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1269

acos(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1270


acosh

acosh<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1305

acosh(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1306


add

add<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
valueFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:993

add<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisGenericFormula
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:994

add(this, value): GenericFormula

Parameters

NameType
thisGenericFormula
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:995


asin

asin<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1263

asin(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1264


asinh

asinh<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1299

asinh(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1300


atan

atan<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1275

atan(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1276


atanh

atanh<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1311

atanh(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1312


calculateConstantOfIntegration

calculateConstantOfIntegration(): default

Calculates C for the implementation of the integral formula for this formula.

Returns

default

Defined in

profectus/src/game/formulas/formulas.ts:128


cbrt

cbrt<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1160

cbrt(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1161


ceil

ceil(): GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:985


clamp

clamp(min, max): GenericFormula

Parameters

NameType
minFormulaSource
maxFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1053


clampMax

clampMax(value): default<[FormulaSource, FormulaSource]>

Parameters

NameType
valueFormulaSource

Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:1061


clampMin

clampMin(value): default<[FormulaSource, FormulaSource]>

Parameters

NameType
valueFormulaSource

Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:1057


conditional

conditional(condition, formulaModifier): GenericFormula

Parameters

NameType
conditionComputable<boolean>
formulaModifier(value: GenericFormula & { invert: (value: DecimalSource) => DecimalSource } & { evaluateIntegral: (variable?: DecimalSource) => DecimalSource } & { invertIntegral: (value: DecimalSource) => DecimalSource }) => GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:951


cos

cos<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1251

cos(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1252


cosh

cosh<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1287

cosh(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1288


cube

cube<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1154

cube(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1155


div

div<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
valueFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1019

div<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisGenericFormula
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1020

div(this, value): GenericFormula

Parameters

NameType
thisGenericFormula
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1021


equals

equals(other): boolean

Compares if two formulas are equivalent to each other. Note that function contexts can lead to false negatives.

Parameters

NameTypeDescription
otherGenericFormulaThe formula to compare to this one.

Returns

boolean

Defined in

profectus/src/game/formulas/formulas.ts:281


evaluate

evaluate(variable?): DecimalSource

Evaluate the current result of the formula

Parameters

NameTypeDescription
variable?DecimalSourceOptionally override the value of the variable while evaluating. Ignored if there is not variable

Returns

DecimalSource

Defined in

profectus/src/game/formulas/formulas.ts:162


evaluateIntegral

evaluateIntegral(variable?): DecimalSource

Evaluate the result of the indefinite integral (sans the constant of integration). Only works if there's a single variable and the formula is integrable. The formula can only have one "complex" operation (anything besides +,-,*,/).

See

isIntegrable

Parameters

NameTypeDescription
variable?DecimalSourceOptionally override the value of the variable while evaluating

Returns

DecimalSource

Defined in

profectus/src/game/formulas/formulas.ts:194


exp

exp<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1137

exp(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1138


factorial

factorial(): default<[FormulaSource]>

Returns

default<[FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:1126


floor

floor(): GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:981


gamma

gamma(): default<[FormulaSource]>

Returns

default<[FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:1130


getIntegralFormula

getIntegralFormula(stack?): GenericFormula

Get a formula that will evaluate to the integral of this formula. May also be invertible.

Parameters

NameTypeDescription
stack?SubstitutionStackFor nested formulas, a stack of operations that occur outside the complex operation.

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:217


hasVariable

hasVariable(): boolean

Whether or not this formula has a singular variable inside it, which can be accessed via innermostVariable.

Returns

boolean

Defined in

profectus/src/game/formulas/formulas.ts:154


if

if(condition, formulaModifier): GenericFormula

Parameters

NameType
conditionComputable<boolean>
formulaModifier(value: GenericFormula & { invert: (value: DecimalSource) => DecimalSource } & { evaluateIntegral: (variable?: DecimalSource) => DecimalSource } & { invertIntegral: (value: DecimalSource) => DecimalSource }) => GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:943


invert

invert(value): DecimalSource

Takes a potential result of the formula, and calculates what value the variable inside the formula would have to be for that result to occur. Only works if there's a single variable and if the formula is invertible.

See

isInvertible

Parameters

NameTypeDescription
valueDecimalSourceThe result of the formula

Returns

DecimalSource

Defined in

profectus/src/game/formulas/formulas.ts:180


invertIntegral

invertIntegral(value): DecimalSource

Given the potential result of the formula's integral (and the constant of integration), calculate what value the variable inside the formula would have to be for that result to occur. Only works if there's a single variable and if the formula's integral is invertible.

See

isIntegralInvertible

Parameters

NameTypeDescription
valueDecimalSourceThe result of the integral.

Returns

DecimalSource

Defined in

profectus/src/game/formulas/formulas.ts:206


isIntegrable

isIntegrable(): this is IntegrableFormula

Type predicate that this formula can be integrated.

Returns

this is IntegrableFormula

Defined in

profectus/src/game/formulas/formulas.ts:141


isIntegralInvertible

isIntegralInvertible(): this is InvertibleIntegralFormula

Type predicate that this formula has an integral function that can be inverted.

Returns

this is InvertibleIntegralFormula

Defined in

profectus/src/game/formulas/formulas.ts:146


isInvertible

isInvertible(): this is InvertibleFormula

Type predicate that this formula can be inverted.

Returns

this is InvertibleFormula

Defined in

profectus/src/game/formulas/formulas.ts:136


iteratedexp

iteratedexp<T>(this, height?, payload?): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
height?FormulaSource
payload?FormulaSource

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:1184

iteratedexp(this, height?, payload?): GenericFormula

Parameters

NameType
thisFormulaSource
height?FormulaSource
payload?FormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1189


iteratedlog

iteratedlog(base?, times?): GenericFormula

Parameters

NameTypeDefault value
baseFormulaSource10
timesFormulaSource1

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1202


lambertw

lambertw<T>(this): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:1226

lambertw(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1227


layeradd

layeradd<T>(this, diff, base?): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
diffFormulaSource
base?FormulaSource

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:1216

layeradd(this, diff, base?): GenericFormula

Parameters

NameType
thisFormulaSource
diffFormulaSource
base?FormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1221


layeradd10

layeradd10(diff): default<[FormulaSource, FormulaSource]>

Parameters

NameType
diffFormulaSource

Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:1212


ln

ln<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1093

ln(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1094


lngamma

lngamma(): default<[FormulaSource]>

Returns

default<[FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:1133


log

log<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
valueFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1079

log<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisFormulaSource
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1080

log(this, value): GenericFormula

Parameters

NameType
thisFormulaSource
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1081


log10

log10<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1073

log10(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1074


log2

log2<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1087

log2(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1088


max

max(value): default<[FormulaSource, FormulaSource]>

Parameters

NameType
valueFormulaSource

Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:1037


maxabs

maxabs(value): default<[FormulaSource, FormulaSource]>

Parameters

NameType
valueFormulaSource

Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:1045


min

min(value): default<[FormulaSource, FormulaSource]>

Parameters

NameType
valueFormulaSource

Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:1041


minabs

minabs(value): default<[FormulaSource, FormulaSource]>

Parameters

NameType
valueFormulaSource

Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:1049


mul

mul<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
valueFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1010

mul<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisGenericFormula
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1011

mul(this, value): GenericFormula

Parameters

NameType
thisGenericFormula
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1012


neg

neg<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:964

neg(this): GenericFormula

Parameters

NameType
thisGenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:965


pLog10

pLog10(): GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1065


pentate

pentate(height?, payload?): GenericFormula

Parameters

NameTypeDefault value
heightFormulaSource2
payloadFormulaSourceundefined

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1238


pow

pow<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
valueFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1099

pow<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisFormulaSource
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1100

pow(this, value): GenericFormula

Parameters

NameType
thisFormulaSource
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1101


pow10

pow10<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1106

pow10(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1107


pow_base

pow_base<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
valueFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1112

pow_base<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisFormulaSource
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1113

pow_base(this, value): GenericFormula

Parameters

NameType
thisFormulaSource
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1114


recip

recip<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1029

recip(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1030


root

root<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
valueFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1119

root<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisFormulaSource
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1120

root(this, value): GenericFormula

Parameters

NameType
thisFormulaSource
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1121


round

round(): GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:977


setupConstant

Private setupConstant(«destructured»): InternalFormulaProperties<T>

Parameters

NameType
«destructured»Object
› inputs[FormulaSource]

Returns

InternalFormulaProperties<T>

Defined in

profectus/src/game/formulas/formulas.ts:93


setupFormula

Private setupFormula(options): InternalFormulaProperties<T>

Parameters

NameType
optionsGeneralFormulaOptions<T>

Returns

InternalFormulaProperties<T>

Defined in

profectus/src/game/formulas/formulas.ts:103


setupVariable

Private setupVariable(«destructured»): InternalFormulaProperties<T>

Parameters

NameType
«destructured»Object
› variableProcessedComputable<DecimalSource>

Returns

InternalFormulaProperties<T>

Defined in

profectus/src/game/formulas/formulas.ts:78


sign

sign(): GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:972


sin

sin<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1245

sin(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1246


sinh

sinh<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1281

sinh(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1282


slog

slog<T>(this, base?): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
base?FormulaSource

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:1206

slog(this, base?): GenericFormula

Parameters

NameType
thisFormulaSource
base?FormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1207


sqr

sqr<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1143

sqr(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1144


sqrt

sqrt<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1149

sqrt(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1150


ssqrt

ssqrt<T>(this): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:1232

ssqrt(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1233


step

step(start, formulaModifier): GenericFormula

Parameters

NameType
startComputable<DecimalSource>
formulaModifier(value: GenericFormula & { invert: (value: DecimalSource) => DecimalSource } & { evaluateIntegral: (variable?: DecimalSource) => DecimalSource } & { invertIntegral: (value: DecimalSource) => DecimalSource }) => GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:934


sub

sub<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
valueFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1001

sub<T>(this, value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisGenericFormula
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1002

sub(this, value): GenericFormula

Parameters

NameType
thisGenericFormula
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1003


tan

tan<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1257

tan(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1258


tanh

tanh<T>(this): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:1293

tanh(this): GenericFormula

Parameters

NameType
thisFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1294


tetrate

tetrate<T>(this, height?, payload?): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
thisT
height?FormulaSource
payload?FormulaSource

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:1166

tetrate(this, height?, payload?): GenericFormula

Parameters

NameType
thisFormulaSource
height?FormulaSource
payload?FormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:1171


trunc

trunc(): GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:989


abs

Static abs(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:413


absLog10

Static absLog10(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:551


acos

Static acos<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:846

Static acos(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:847


acosh

Static acosh<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:912

Static acosh(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:913


add

Static add<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
otherFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:452

Static add<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueFormulaSource
otherT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:453

Static add(value, other): GenericFormula

Parameters

NameType
valueFormulaSource
otherFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:454


asin

Static asin<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:835

Static asin(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:836


asinh

Static asinh<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:901

Static asinh(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:902


atan

Static atan<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:857

Static atan(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:858


atanh

Static atanh<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:923

Static atanh(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:924


cbrt

Static cbrt<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:689

Static cbrt(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:690


ceil

Static ceil(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:444


clamp

Static clamp(value, min, max): GenericFormula

Parameters

NameType
valueFormulaSource
minFormulaSource
maxFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:535


conditional

Static conditional(value, condition, formulaModifier): GenericFormula

See

if

Parameters

NameType
valueFormulaSource
conditionComputable<boolean>
formulaModifier(value: GenericFormula & { invert: (value: DecimalSource) => DecimalSource } & { evaluateIntegral: (variable?: DecimalSource) => DecimalSource } & { invertIntegral: (value: DecimalSource) => DecimalSource }) => GenericFormula

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:403


constant

Static constant(value): GenericFormula & { invert: (value: DecimalSource) => DecimalSource } & { evaluateIntegral: (variable?: DecimalSource) => DecimalSource } & { invertIntegral: (value: DecimalSource) => DecimalSource }

Creates a formula that evaluates to a constant value.

Parameters

NameTypeDescription
valueProcessedComputable<DecimalSource>The constant value for this formula.

Returns

GenericFormula & { invert: (value: DecimalSource) => DecimalSource } & { evaluateIntegral: (variable?: DecimalSource) => DecimalSource } & { invertIntegral: (value: DecimalSource) => DecimalSource }

Defined in

profectus/src/game/formulas/formulas.ts:302


cos

Static cos<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:813

Static cos(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:814


cosh

Static cosh<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:879

Static cosh(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:880


cube

Static cube<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:683

Static cube(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:684


div

Static div<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
otherFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:498

Static div<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueFormulaSource
otherT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:499

Static div(value, other): GenericFormula

Parameters

NameType
valueFormulaSource
otherFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:500


exp

Static exp<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:660

Static exp(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:661


factorial

Static factorial(value): default<[FormulaSource]>

Parameters

NameType
valueFormulaSource

Returns

default<[FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:648


floor

Static floor(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:440


gamma

Static gamma(value): default<[FormulaSource]>

Parameters

NameType
valueFormulaSource

Returns

default<[FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:652


if

Static if(value, condition, formulaModifier): GenericFormula

Applies a modifier to a formula under a given condition.

Parameters

NameTypeDescription
valueFormulaSourceThe incoming formula value
conditionComputable<boolean>Whether or not to apply the modifier
formulaModifier(value: GenericFormula & { invert: (value: DecimalSource) => DecimalSource } & { evaluateIntegral: (variable?: DecimalSource) => DecimalSource } & { invertIntegral: (value: DecimalSource) => DecimalSource }) => GenericFormulaThe modifier to apply to the incoming formula if the condition is true

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:368


iteratedexp

Static iteratedexp<T>(value, height?, payload?): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
height?FormulaSource
payload?FormulaSource

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:717

Static iteratedexp(value, height?, payload?): GenericFormula

Parameters

NameType
valueFormulaSource
height?FormulaSource
payload?FormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:722


iteratedlog

Static iteratedlog(value, base?, times?): GenericFormula

Parameters

NameTypeDefault value
valueFormulaSourceundefined
baseFormulaSource10
timesFormulaSource1

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:739


lambertw

Static lambertw<T>(value): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:778

Static lambertw(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:779


layeradd

Static layeradd<T>(value, diff, base?): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
diffFormulaSource
base?FormulaSource

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:760

Static layeradd(value, diff, base?): GenericFormula

Parameters

NameType
valueFormulaSource
diffFormulaSource
base?FormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:765


layeradd10

Static layeradd10(value, diff): default<[FormulaSource, FormulaSource]>

Parameters

NameType
valueFormulaSource
diffFormulaSource

Returns

default<[FormulaSource, FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:756


ln

Static ln<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:590

Static ln(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:591


lngamma

Static lngamma(value): default<[FormulaSource]>

Parameters

NameType
valueFormulaSource

Returns

default<[FormulaSource]>

Defined in

profectus/src/game/formulas/formulas.ts:656


log

Static log<T>(value, base): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
baseFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:566

Static log<T>(value, base): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueFormulaSource
baseT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:567

Static log(value, base): GenericFormula

Parameters

NameType
valueFormulaSource
baseFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:568


log10

Static log10<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:555

Static log10(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:556


log2

Static log2<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:579

Static log2(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:580


mul

Static mul<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
otherFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:483

Static mul<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueFormulaSource
otherT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:484

Static mul(value, other): GenericFormula

Parameters

NameType
valueFormulaSource
otherFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:485


neg

Static neg<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:417

Static neg(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:418


pLog10

Static pLog10(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:547


pentate

Static pentate(value, height?, payload?): GenericFormula

Parameters

NameTypeDefault value
valueFormulaSourceundefined
heightFormulaSource2
payloadFormulaSourceundefined

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:794


pow

Static pow<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
otherFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:601

Static pow<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueFormulaSource
otherT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:602

Static pow(value, other): GenericFormula

Parameters

NameType
valueFormulaSource
otherFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:603


pow10

Static pow10<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:613

Static pow10(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:614


pow_base

Static pow_base<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
otherFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:624

Static pow_base<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueFormulaSource
otherT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:625

Static pow_base(value, other): GenericFormula

Parameters

NameType
valueFormulaSource
otherFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:626


recip

Static recip<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:514

Static recip(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:515


root

Static root<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
otherFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:636

Static root<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueFormulaSource
otherT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:637

Static root(value, other): GenericFormula

Parameters

NameType
valueFormulaSource
otherFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:638


round

Static round(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:436


sign

Static sign(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:431


sin

Static sin<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:802

Static sin(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:803


sinh

Static sinh<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:868

Static sinh(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:869


slog

Static slog<T>(value, base?): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
base?FormulaSource

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:747

Static slog(value, base?): GenericFormula

Parameters

NameType
valueFormulaSource
base?FormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:751


sqr

Static sqr<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:671

Static sqr(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:672


sqrt

Static sqrt<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:677

Static sqrt(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:678


ssqrt

Static ssqrt<T>(value): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:788

Static ssqrt(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:789


step

Static step(value, start, formulaModifier): GenericFormula

Creates a step-wise formula. After start the formula will have an additional modifier. This function assumes the incoming value will be continuous and monotonically increasing.

Parameters

NameTypeDescription
valueFormulaSourceThe value before applying the step
startComputable<DecimalSource>The value at which to start applying the step
formulaModifier(value: GenericFormula & { invert: (value: DecimalSource) => DecimalSource } & { evaluateIntegral: (variable?: DecimalSource) => DecimalSource } & { invertIntegral: (value: DecimalSource) => DecimalSource }) => GenericFormulaHow this step should modify the formula. The incoming value will be the unmodified formula value minus the start value. So for example if an incoming formula evaluates to 200 and has a step that starts at 150, the formulaModifier would be given 50 as the parameter

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:326


sub

Static sub<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
otherFormulaSource

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:467

Static sub<T>(value, other): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueFormulaSource
otherT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:468

Static sub(value, other): GenericFormula

Parameters

NameType
valueFormulaSource
otherFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:469


tan

Static tan<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:824

Static tan(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:825


tanh

Static tanh<T>(value): T

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT

Returns

T

Defined in

profectus/src/game/formulas/formulas.ts:890

Static tanh(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:891


tetrate

Static tetrate<T>(value, height?, payload?): Omit<T, "integrate">

Type parameters

NameType
Textends default<any, T>

Parameters

NameType
valueT
height?FormulaSource
payload?FormulaSource

Returns

Omit<T, "integrate">

Defined in

profectus/src/game/formulas/formulas.ts:695

Static tetrate(value, height?, payload?): GenericFormula

Parameters

NameType
valueFormulaSource
height?FormulaSource
payload?FormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:700


trunc

Static trunc(value): GenericFormula

Parameters

NameType
valueFormulaSource

Returns

GenericFormula

Defined in

profectus/src/game/formulas/formulas.ts:448


variable

Static variable(value): GenericFormula & { invert: (value: DecimalSource) => DecimalSource } & { evaluateIntegral: (variable?: DecimalSource) => DecimalSource } & { invertIntegral: (value: DecimalSource) => DecimalSource }

Creates a formula that is marked as the variable for an outer formula. Typically used for inverting and integrating.

Parameters

NameTypeDescription
valueProcessedComputable<DecimalSource>The variable for this formula.

Returns

GenericFormula & { invert: (value: DecimalSource) => DecimalSource } & { evaluateIntegral: (variable?: DecimalSource) => DecimalSource } & { invertIntegral: (value: DecimalSource) => DecimalSource }

Defined in

profectus/src/game/formulas/formulas.ts:312

',2730),d=[l];function s(c,n,i,u,h,f){return a(),t("div",null,d)}const g=e(o,[["render",s]]);export{p as __pageData,g as default};