random
Generates an Arith decimal value in the half-open range [0, 1).
API Reference
Signature
Parameters
Returns
Returns a new Arith instance r where 0 <= r < 1.
Throws
- Throws if
decimalPlacesis invalid. - Throws if
CRYPTOistruebut no crypto source is available.
Agent Contract
Agent Notes
- Do not assume deterministic output in tests; assert range and decimal-place constraints instead.
- Import with
import { Arith } from "@teakit/arith"; default imports are unsupported. - Static helpers are called as
Arith.method(...)and do not require an instance receiver. - Do not generate
BigNumber,Decimal,isBigNumber, orisDecimalcompatibility APIs. - Use string inputs for exact decimal values when a static helper accepts numeric values.