DeltaCalc.Quantization (DeltaCalc v0.3.0)

Copy Markdown View Source

Legacy output-boundary quantization retained for retired-dashboard compatibility.

API Functions

FunctionArityDescriptionParam Kinds
quantize1Round a Decimal to the retired dashboard's eight-place compatibility format.value: value

Summary

Functions

Round a Decimal to the retired dashboard's eight-place compatibility format.

Functions

quantize(value)

@spec quantize(Decimal.t()) :: Decimal.t()

Round a Decimal to the retired dashboard's eight-place compatibility format.

Parameters

  • value - Value to quantize as a canonical decimal string; native Elixir callers may also pass Decimal or integer. (value)

Returns

Value rounded to the legacy 8-place format (decimal)

# descripex:contract
%{
  params: %{
    value: %{
      description: "Value to quantize as a canonical decimal string; native Elixir callers may also pass Decimal or integer.",
      kind: :value,
      schema: %{"type" => "string"}
    }
  },
  returns: %{
    type: :decimal,
    description: "Value rounded to the legacy 8-place format"
  }
}