MCPcopy Create free account
hub / github.com/Effect-TS/effect / bigDecimalMaxValueAtScale

Function bigDecimalMaxValueAtScale

packages/effect/src/Schema.ts:12217–12225  ·  view source on GitHub ↗
(
  maximum: BigDecimal_.BigDecimal,
  scale: number,
  excluded: boolean
)

Source from the content-addressed store, hash-verified

12215}
12216
12217function bigDecimalMaxValueAtScale(
12218 maximum: BigDecimal_.BigDecimal,
12219 scale: number,
12220 excluded: boolean
12221): bigint {
12222 return excluded
12223 ? bigDecimalScaleValueAtScale(BigDecimal_.ceil(maximum, scale), scale) - globalThis.BigInt(1)
12224 : bigDecimalScaleValueAtScale(BigDecimal_.floor(maximum, scale), scale)
12225}
12226
12227function bigDecimalMaxScale(ordered: Annotations.ToArbitrary.OrderedConstraint<BigDecimal_.BigDecimal>): number {
12228 return Math.max(

Callers 1

Calls 1

Tested by

no test coverage detected