Skip to content

Profectus / game/formulas/formulas / InternalFormula

Class: abstract InternalFormula<T> ​

Extended by ​

Type Parameters ​

• T extends [FormulaSource] | FormulaSource[]

Constructors ​

new InternalFormula() ​

new InternalFormula<T>(options): InternalFormula<T>

Parameters ​

options ​

FormulaOptions<T>

Returns ​

InternalFormula<T>

Defined in ​

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

Properties ​

applySubstitution ​

protected readonly applySubstitution: undefined | SubstitutionFunction<T>

Defined in ​

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


description ​

protected readonly description: undefined | string

Defined in ​

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


divide() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

value ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

GenericFormula

value ​

T

Returns ​

T

Parameters ​

this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


divideBy() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

value ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

GenericFormula

value ​

T

Returns ​

T

Parameters ​

this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


dividedBy() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

value ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

GenericFormula

value ​

T

Returns ​

T

Parameters ​

this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


innermostVariable ​

readonly innermostVariable: undefined | MaybeRef<DecimalSource>

Defined in ​

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


inputs ​

readonly inputs: T

Defined in ​

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


internalEvaluate ​

protected readonly internalEvaluate: undefined | EvaluateFunction<T>

Defined in ​

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


internalIntegrate ​

protected readonly internalIntegrate: undefined | IntegrateFunction<T>

Defined in ​

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


internalIntegrateInner ​

protected readonly internalIntegrateInner: undefined | IntegrateFunction<T>

Defined in ​

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


internalInvert ​

protected readonly internalInvert: undefined | InvertFunction<T>

Defined in ​

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


internalVariables ​

protected readonly internalVariables: number

Defined in ​

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


logarithm() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

value ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

any

value ​

T

Returns ​

T

Parameters ​

this ​

any

value ​

any

Returns ​

GenericFormula

Defined in ​

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


minus() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

value ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

GenericFormula

value ​

T

Returns ​

T

Parameters ​

this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


multiply() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

value ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

GenericFormula

value ​

T

Returns ​

T

Parameters ​

this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


negate() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

Returns ​

T

Parameters ​

this ​

GenericFormula

Returns ​

GenericFormula

Defined in ​

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


negated() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

Returns ​

T

Parameters ​

this ​

GenericFormula

Returns ​

GenericFormula

Defined in ​

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


plus() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

value ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

GenericFormula

value ​

T

Returns ​

T

Parameters ​

this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


reciprocal() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

Returns ​

T

Parameters ​

this ​

any

Returns ​

GenericFormula

Defined in ​

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


reciprocate() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

Returns ​

T

Parameters ​

this ​

any

Returns ​

GenericFormula

Defined in ​

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


sgn() ​

sgn: () => default<[any]>

Returns ​

default<[any]>

Defined in ​

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


subtract() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

value ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

GenericFormula

value ​

T

Returns ​

T

Parameters ​

this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


times() ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

T

value ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

this ​

GenericFormula

value ​

T

Returns ​

T

Parameters ​

this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


clampMax() ​

static clampMax: (value, other) => default<[any, any]>

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


clampMin() ​

static clampMin: (value, other) => default<[any, any]>

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


divide() ​

static divide: <T>(value, other) => T<T>(value, other) => T(value, other) => default<[any, any]> = InternalFormula.div

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

other ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

any

other ​

T

Returns ​

T

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


divideBy() ​

static divideBy: <T>(value, other) => T<T>(value, other) => T(value, other) => default<[any, any]> = InternalFormula.div

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

other ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

any

other ​

T

Returns ​

T

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


dividedBy() ​

static dividedBy: <T>(value, other) => T<T>(value, other) => T(value, other) => default<[any, any]> = InternalFormula.div

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

other ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

any

other ​

T

Returns ​

T

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


logarithm() ​

static logarithm: <T>(value, base) => T<T>(value, base) => T(value, base) => default<[any, any]> = InternalFormula.log

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

base ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

any

base ​

T

Returns ​

T

Parameters ​

value ​

any

base ​

any

Returns ​

default<[any, any]>

Defined in ​

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


max() ​

static max: (value, other) => default<[any, any]>

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


maxabs() ​

static maxabs: (value, other) => default<[any, any]>

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


min() ​

static min: (value, other) => default<[any, any]>

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


minabs() ​

static minabs: (value, other) => default<[any, any]>

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


minus() ​

static minus: <T>(value, other) => T<T>(value, other) => T(value, other) => default<[any, any]> = InternalFormula.sub

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

other ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

any

other ​

T

Returns ​

T

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


multiply() ​

static multiply: <T>(value, other) => T<T>(value, other) => T(value, other) => default<[any, any]> = InternalFormula.mul

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

other ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

any

other ​

T

Returns ​

T

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


negate() ​

static negate: <T>(value) => T(value) => GenericFormula = InternalFormula.neg

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

Returns ​

T

Parameters ​

value ​

any

Returns ​

GenericFormula

Defined in ​

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


negated() ​

static negated: <T>(value) => T(value) => GenericFormula = InternalFormula.neg

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

Returns ​

T

Parameters ​

value ​

any

Returns ​

GenericFormula

Defined in ​

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


plus() ​

static plus: <T>(value, other) => T<T>(value, other) => T(value, other) => InternalFormula<[any, any]> = InternalFormula.add

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

other ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

any

other ​

T

Returns ​

T

Parameters ​

value ​

any

other ​

any

Returns ​

InternalFormula<[any, any]>

Defined in ​

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


reciprocal() ​

static reciprocal: <T>(value) => T(value) => default<[any]> = InternalFormula.recip

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

Returns ​

T

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


reciprocate() ​

static reciprocate: <T>(value) => T(value) => default<[any]> = InternalFormula.recip

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

Returns ​

T

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


sgn() ​

static sgn: (value) => default<[any]> = InternalFormula.sign

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


subtract() ​

static subtract: <T>(value, other) => T<T>(value, other) => T(value, other) => default<[any, any]> = InternalFormula.sub

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

other ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

any

other ​

T

Returns ​

T

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


times() ​

static times: <T>(value, other) => T<T>(value, other) => T(value, other) => default<[any, any]> = InternalFormula.mul

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

T

other ​

any

Returns ​

T

Type Parameters ​

• T extends GenericFormula

Parameters ​

value ​

any

other ​

T

Returns ​

T

Parameters ​

value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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

Methods ​

abs() ​

abs(): default<[any]>

Returns ​

default<[any]>

Defined in ​

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


absLog10() ​

absLog10(): default<[any]>

Returns ​

default<[any]>

Defined in ​

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


acos() ​

Call Signature ​

acos<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

acos(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


acosh() ​

Call Signature ​

acosh<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

acosh(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


add() ​

Call Signature ​

add<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

value ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

add<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

GenericFormula

value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

add(this, value): GenericFormula

Parameters ​
this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


asin() ​

Call Signature ​

asin<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

asin(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


asinh() ​

Call Signature ​

asinh<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

asinh(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


atan() ​

Call Signature ​

atan<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

atan(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


atanh() ​

Call Signature ​

atanh<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

atanh(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


calculateConstantOfIntegration()? ​

optional calculateConstantOfIntegration(): default

Returns ​

default

Defined in ​

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


cbrt() ​

Call Signature ​

cbrt<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

cbrt(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


ceil() ​

ceil(): default<[any]>

Returns ​

default<[any]>

Defined in ​

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


clamp() ​

clamp(min, max): default<[any, any, any]>

Parameters ​

min ​

any

max ​

any

Returns ​

default<[any, any, any]>

Defined in ​

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


clampMax() ​

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

Parameters ​

value ​

any

Returns ​

default<[any, any]>

Defined in ​

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


clampMin() ​

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

Parameters ​

value ​

any

Returns ​

default<[any, any]>

Defined in ​

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


conditional() ​

conditional(condition, formulaModifier): default<[any]>

Parameters ​

condition ​

MaybeRefOrGetter<boolean>

formulaModifier ​

(value) => GenericFormula

Returns ​

default<[any]>

Defined in ​

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


cos() ​

Call Signature ​

cos<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

cos(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


cosh() ​

Call Signature ​

cosh<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

cosh(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


cube() ​

Call Signature ​

cube<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

cube(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


div() ​

Call Signature ​

div<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

value ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

div<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

GenericFormula

value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

div(this, value): GenericFormula

Parameters ​
this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


equals() ​

equals(other): boolean

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

Parameters ​

other ​

GenericFormula

The formula to compare to this one.

Returns ​

boolean

Defined in ​

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


evaluate() ​

evaluate(variable?): DecimalSource

Evaluate the current result of the formula

Parameters ​

variable? ​

DecimalSource

Optionally override the value of the variable while evaluating. Ignored if there is not variable

Returns ​

DecimalSource

Defined in ​

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


evaluateIntegral()? ​

optional evaluateIntegral(variable?): DecimalSource

Parameters ​

variable? ​

DecimalSource

Returns ​

DecimalSource

Defined in ​

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


exp() ​

Call Signature ​

exp<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

exp(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


factorial() ​

factorial(): default<[any]>

Returns ​

default<[any]>

Defined in ​

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


floor() ​

floor(): default<[any]>

Returns ​

default<[any]>

Defined in ​

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


gamma() ​

gamma(): default<[any]>

Returns ​

default<[any]>

Defined in ​

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


getIntegralFormula()? ​

optional getIntegralFormula(stack?): GenericFormula

Parameters ​

stack? ​

SubstitutionStack

Returns ​

GenericFormula

Defined in ​

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


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:164


if() ​

if(condition, formulaModifier): default<[any]>

Parameters ​

condition ​

MaybeRefOrGetter<boolean>

formulaModifier ​

(value) => GenericFormula

Returns ​

default<[any]>

Defined in ​

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


invert()? ​

optional invert(value): DecimalSource

Parameters ​

value ​

DecimalSource

Returns ​

DecimalSource

Defined in ​

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


invertIntegral()? ​

optional invertIntegral(value): DecimalSource

Parameters ​

value ​

DecimalSource

Returns ​

DecimalSource

Defined in ​

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


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:151


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:156


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:146


iteratedexp() ​

Call Signature ​

iteratedexp<T>(this, height?, payload?): InvertibleFormula

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

height? ​

any

payload? ​

any

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

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

Parameters ​
this ​

any

height? ​

any

payload? ​

any

Returns ​

GenericFormula

Defined in ​

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


iteratedlog() ​

iteratedlog(base, times): default<[any, any, any]>

Parameters ​

base ​

any = 10

times ​

any = 1

Returns ​

default<[any, any, any]>

Defined in ​

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


lambertw() ​

Call Signature ​

lambertw<T>(this): InvertibleFormula

Type Parameters ​

• T extends InvertibleFormula

Parameters ​
this ​

T

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

lambertw(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


layeradd() ​

Call Signature ​

layeradd<T>(this, diff, base?): InvertibleFormula

Type Parameters ​

• T extends InvertibleFormula

Parameters ​
this ​

T

diff ​

any

base? ​

any

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

layeradd(this, diff, base?): GenericFormula

Parameters ​
this ​

any

diff ​

any

base? ​

any

Returns ​

GenericFormula

Defined in ​

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


layeradd10() ​

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

Parameters ​

diff ​

any

Returns ​

default<[any, any]>

Defined in ​

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


ln() ​

Call Signature ​

ln<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

ln(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


lngamma() ​

lngamma(): default<[any]>

Returns ​

default<[any]>

Defined in ​

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


log() ​

Call Signature ​

log<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

value ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

log<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

any

value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

log(this, value): GenericFormula

Parameters ​
this ​

any

value ​

any

Returns ​

GenericFormula

Defined in ​

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


log10() ​

Call Signature ​

log10<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

log10(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


log2() ​

Call Signature ​

log2<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

log2(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


max() ​

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

Parameters ​

value ​

any

Returns ​

default<[any, any]>

Defined in ​

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


maxabs() ​

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

Parameters ​

value ​

any

Returns ​

default<[any, any]>

Defined in ​

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


min() ​

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

Parameters ​

value ​

any

Returns ​

default<[any, any]>

Defined in ​

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


minabs() ​

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

Parameters ​

value ​

any

Returns ​

default<[any, any]>

Defined in ​

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


mul() ​

Call Signature ​

mul<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

value ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

mul<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

GenericFormula

value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

mul(this, value): GenericFormula

Parameters ​
this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


neg() ​

Call Signature ​

neg<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

neg(this): GenericFormula

Parameters ​
this ​

GenericFormula

Returns ​

GenericFormula

Defined in ​

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


pentate() ​

pentate(height, payload): default<[any, any, any]>

Parameters ​

height ​

any = 2

payload ​

any = ...

Returns ​

default<[any, any, any]>

Defined in ​

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


pLog10() ​

pLog10(): default<[any]>

Returns ​

default<[any]>

Defined in ​

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


pow() ​

Call Signature ​

pow<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

value ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

pow<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

any

value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

pow(this, value): GenericFormula

Parameters ​
this ​

any

value ​

any

Returns ​

GenericFormula

Defined in ​

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


pow_base() ​

Call Signature ​

pow_base<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

value ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

pow_base<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

any

value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

pow_base(this, value): GenericFormula

Parameters ​
this ​

any

value ​

any

Returns ​

GenericFormula

Defined in ​

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


pow10() ​

Call Signature ​

pow10<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

pow10(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


recip() ​

Call Signature ​

recip<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

recip(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


root() ​

Call Signature ​

root<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

value ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

root<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

any

value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

root(this, value): GenericFormula

Parameters ​
this ​

any

value ​

any

Returns ​

GenericFormula

Defined in ​

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


round() ​

round(): default<[any]>

Returns ​

default<[any]>

Defined in ​

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


sign() ​

sign(): default<[any]>

Returns ​

default<[any]>

Defined in ​

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


sin() ​

Call Signature ​

sin<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

sin(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


sinh() ​

Call Signature ​

sinh<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

sinh(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


slog() ​

Call Signature ​

slog<T>(this, base?): InvertibleFormula

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

base? ​

any

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

slog(this, base?): GenericFormula

Parameters ​
this ​

any

base? ​

any

Returns ​

GenericFormula

Defined in ​

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


sqr() ​

Call Signature ​

sqr<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

sqr(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


sqrt() ​

Call Signature ​

sqrt<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

sqrt(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


ssqrt() ​

Call Signature ​

ssqrt<T>(this): InvertibleFormula

Type Parameters ​

• T extends InvertibleFormula

Parameters ​
this ​

T

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

ssqrt(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


step() ​

step(start, formulaModifier): default<[any]>

Parameters ​

start ​

MaybeRefOrGetter<DecimalSource>

formulaModifier ​

(value) => GenericFormula

Returns ​

default<[any]>

Defined in ​

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


stringify() ​

stringify(): string

Returns ​

string

Defined in ​

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


sub() ​

Call Signature ​

sub<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

value ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

sub<T>(this, value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

GenericFormula

value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

sub(this, value): GenericFormula

Parameters ​
this ​

GenericFormula

value ​

any

Returns ​

GenericFormula

Defined in ​

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


tan() ​

Call Signature ​

tan<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

tan(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


tanh() ​

Call Signature ​

tanh<T>(this): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

tanh(this): GenericFormula

Parameters ​
this ​

any

Returns ​

GenericFormula

Defined in ​

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


tetrate() ​

Call Signature ​

tetrate<T>(this, height?, payload?): InvertibleFormula

Type Parameters ​

• T extends GenericFormula

Parameters ​
this ​

T

height? ​

any

payload? ​

any

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

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

Parameters ​
this ​

any

height? ​

any

payload? ​

any

Returns ​

GenericFormula

Defined in ​

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


trunc() ​

trunc(): default<[any]>

Returns ​

default<[any]>

Defined in ​

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


abs() ​

static abs(value): default<[any]>

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


absLog10() ​

static absLog10(value): default<[any]>

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


acos() ​

Call Signature ​

static acos<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static acos(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


acosh() ​

Call Signature ​

static acosh<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static acosh(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


add() ​

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

other ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

any

other ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static add(value, other): InternalFormula<[any, any]>

Parameters ​
value ​

any

other ​

any

Returns ​

InternalFormula<[any, any]>

Defined in ​

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


asin() ​

Call Signature ​

static asin<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static asin(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


asinh() ​

Call Signature ​

static asinh<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static asinh(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


atan() ​

Call Signature ​

static atan<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static atan(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


atanh() ​

Call Signature ​

static atanh<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static atanh(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


cbrt() ​

Call Signature ​

static cbrt<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static cbrt(value): default<[any, any]>

Parameters ​
value ​

any

Returns ​

default<[any, any]>

Defined in ​

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


ceil() ​

static ceil(value): default<[any]>

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


clamp() ​

static clamp(value, min, max): default<[any, any, any]>

Parameters ​

value ​

any

min ​

any

max ​

any

Returns ​

default<[any, any, any]>

Defined in ​

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


conditional() ​

static conditional(value, condition, formulaModifier, elseFormulaModifier?): default<[any]>

Parameters ​

value ​

any

condition ​

MaybeRefOrGetter<boolean>

formulaModifier ​

(value) => GenericFormula

elseFormulaModifier? ​

(value) => GenericFormula

Returns ​

default<[any]>

Defined in ​

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


constant() ​

static constant(value): InvertibleIntegralFormula

Creates a formula that evaluates to a constant value.

Parameters ​

value ​

MaybeRef<DecimalSource>

The constant value for this formula.

Returns ​

InvertibleIntegralFormula

Defined in ​

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


cos() ​

Call Signature ​

static cos<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static cos(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


cosh() ​

Call Signature ​

static cosh<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static cosh(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


cube() ​

Call Signature ​

static cube<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static cube(value): default<[any, any]>

Parameters ​
value ​

any

Returns ​

default<[any, any]>

Defined in ​

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


div() ​

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

other ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

any

other ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static div(value, other): default<[any, any]>

Parameters ​
value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


exp() ​

Call Signature ​

static exp<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static exp(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


factorial() ​

static factorial(value): default<[any]>

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


floor() ​

static floor(value): default<[any]>

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


gamma() ​

static gamma(value): default<[any]>

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


if() ​

static if(value, condition, formulaModifier, elseFormulaModifier?): default<[any]>

Applies a modifier to a formula under a given condition.

Parameters ​

value ​

any

The incoming formula value

condition ​

MaybeRefOrGetter<boolean>

Whether or not to apply the modifier

formulaModifier ​

(value) => GenericFormula

The modifier to apply to the incoming formula if the condition is true

elseFormulaModifier? ​

(value) => GenericFormula

An optional modifier to apply to the incoming formula if the condition is false

Returns ​

default<[any]>

Defined in ​

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


iteratedexp() ​

Call Signature ​

static iteratedexp<T>(value, height?, payload?): InvertibleFormula

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

height? ​

any

payload? ​

any

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

static iteratedexp(value, height?, payload?): default<[any, any, any]>

Parameters ​
value ​

any

height? ​

any

payload? ​

any

Returns ​

default<[any, any, any]>

Defined in ​

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


iteratedlog() ​

static iteratedlog(value, base, times): default<[any, any, any]>

Parameters ​

value ​

any

base ​

any = 10

times ​

any = 1

Returns ​

default<[any, any, any]>

Defined in ​

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


lambertw() ​

Call Signature ​

static lambertw<T>(value): InvertibleFormula

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

static lambertw(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


layeradd() ​

Call Signature ​

static layeradd<T>(value, diff, base?): InvertibleFormula

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

diff ​

any

base? ​

any

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

static layeradd(value, diff, base?): default<[any, any, any]>

Parameters ​
value ​

any

diff ​

any

base? ​

any

Returns ​

default<[any, any, any]>

Defined in ​

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


layeradd10() ​

static layeradd10(value, diff): default<[any, any]>

Parameters ​

value ​

any

diff ​

any

Returns ​

default<[any, any]>

Defined in ​

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


ln() ​

Call Signature ​

static ln<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static ln(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


lngamma() ​

static lngamma(value): default<[any]>

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


log() ​

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

base ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

any

base ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static log(value, base): default<[any, any]>

Parameters ​
value ​

any

base ​

any

Returns ​

default<[any, any]>

Defined in ​

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


log10() ​

Call Signature ​

static log10<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static log10(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


log2() ​

Call Signature ​

static log2<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static log2(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


mul() ​

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

other ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

any

other ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static mul(value, other): default<[any, any]>

Parameters ​
value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


neg() ​

Call Signature ​

static neg<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static neg(value): GenericFormula

Parameters ​
value ​

any

Returns ​

GenericFormula

Defined in ​

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


pentate() ​

static pentate(value, height, payload): default<[any, any, any]>

Parameters ​

value ​

any

height ​

any = 2

payload ​

any = ...

Returns ​

default<[any, any, any]>

Defined in ​

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


pLog10() ​

static pLog10(value): default<[any]>

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


pow() ​

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

other ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

any

other ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static pow(value, other): default<[any, any]>

Parameters ​
value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


pow_base() ​

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

other ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

any

other ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static pow_base(value, other): default<[any, any]>

Parameters ​
value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


pow10() ​

Call Signature ​

static pow10<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static pow10(value): GenericFormula

Parameters ​
value ​

any

Returns ​

GenericFormula

Defined in ​

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


recip() ​

Call Signature ​

static recip<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static recip(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


root() ​

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

other ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

any

other ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static root(value, other): default<[any, any]>

Parameters ​
value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


round() ​

static round(value): default<[any]>

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


sign() ​

static sign(value): default<[any]>

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


sin() ​

Call Signature ​

static sin<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static sin(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


sinh() ​

Call Signature ​

static sinh<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static sinh(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


slog() ​

Call Signature ​

static slog<T>(value, base?): InvertibleFormula

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

base? ​

any

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

static slog(value, base?): default<[any, any]>

Parameters ​
value ​

any

base? ​

any

Returns ​

default<[any, any]>

Defined in ​

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


sqr() ​

Call Signature ​

static sqr<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static sqr(value): default<[any, any]>

Parameters ​
value ​

any

Returns ​

default<[any, any]>

Defined in ​

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


sqrt() ​

Call Signature ​

static sqrt<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static sqrt(value): default<[any, any]>

Parameters ​
value ​

any

Returns ​

default<[any, any]>

Defined in ​

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


ssqrt() ​

Call Signature ​

static ssqrt<T>(value): InvertibleFormula

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

static ssqrt(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


step() ​

static step(value, start, formulaModifier): default<[any]>

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 ​

value ​

any

The value before applying the step

start ​

MaybeRefOrGetter<DecimalSource>

The value at which to start applying the step

formulaModifier ​

(value) => GenericFormula

How 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 ​

default<[any]>

Defined in ​

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


stringify() ​

static stringify(formula): string

Stringifies the formula so it's more easy to read in the console

Parameters ​

formula ​

any

The formula source to print, used for mapping inputs

Returns ​

string

Defined in ​

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


sub() ​

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

other ​

any

Returns ​

T

Defined in ​

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

Call Signature ​

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

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

any

other ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static sub(value, other): default<[any, any]>

Parameters ​
value ​

any

other ​

any

Returns ​

default<[any, any]>

Defined in ​

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


tan() ​

Call Signature ​

static tan<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static tan(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


tanh() ​

Call Signature ​

static tanh<T>(value): T

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

Returns ​

T

Defined in ​

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

Call Signature ​

static tanh(value): default<[any]>

Parameters ​
value ​

any

Returns ​

default<[any]>

Defined in ​

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


tetrate() ​

Call Signature ​

static tetrate<T>(value, height?, payload?): InvertibleFormula

Type Parameters ​

• T extends GenericFormula

Parameters ​
value ​

T

height? ​

any

payload? ​

any

Returns ​

InvertibleFormula

Defined in ​

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

Call Signature ​

static tetrate(value, height?, payload?): default<[any, any, any]>

Parameters ​
value ​

any

height? ​

any

payload? ​

any

Returns ​

default<[any, any, any]>

Defined in ​

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


trunc() ​

static trunc(value): default<[any]>

Parameters ​

value ​

any

Returns ​

default<[any]>

Defined in ​

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


variable() ​

static variable(value): InvertibleIntegralFormula

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

Parameters ​

value ​

MaybeRef<DecimalSource>

The variable for this formula.

Returns ​

InvertibleIntegralFormula

Defined in ​

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