CostEstimate
CostEstimate represents a cost range with overflow-safe arithmetic helpers.
Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CostEstimate(
Min,Max):CostEstimate
Parameters
Section titled “Parameters”bigint
bigint
Returns
Section titled “Returns”CostEstimate
Properties
Section titled “Properties”
readonlyMax:bigint
readonlyMin:bigint
Methods
Section titled “Methods”add(
other):CostEstimate
add returns the sum of two cost ranges with uint64 overflow protection.
Parameters
Section titled “Parameters”CostEstimate
Returns
Section titled “Returns”CostEstimate
multiply()
Section titled “multiply()”multiply(
other):CostEstimate
multiply returns the product of two cost ranges with uint64 overflow protection.
Parameters
Section titled “Parameters”CostEstimate
Returns
Section titled “Returns”CostEstimate
multiplyByCostFactor()
Section titled “multiplyByCostFactor()”multiplyByCostFactor(
costPerUnit):CostEstimate
multiplyByCostFactor scales a cost range and rounds each bound up.
Parameters
Section titled “Parameters”costPerUnit
Section titled “costPerUnit”number
Returns
Section titled “Returns”CostEstimate
union()
Section titled “union()”union(
other):CostEstimate
union returns the smallest estimate that covers both ranges.
Parameters
Section titled “Parameters”CostEstimate
Returns
Section titled “Returns”CostEstimate