MCPcopy Index your code
hub / github.com/Effect-TS/effect / unsafeMakeNormalized

Function unsafeMakeNormalized

packages/effect/src/BigDecimal.ts:115–123  ·  view source on GitHub ↗
(value: bigint, scale: number)

Source from the content-addressed store, hash-verified

113 * @internal
114 */
115export const unsafeMakeNormalized = (value: bigint, scale: number): BigDecimal => {
116 if (value !== bigint0 && value % bigint10 === bigint0) {
117 throw new RangeError("Value must be normalized")
118 }
119
120 const o = make(value, scale)
121 o.normalized = o
122 return o
123}
124
125const bigint0 = BigInt(0)
126const bigint1 = BigInt(1)

Callers 2

BigDecimal.tsFile · 0.85
normalizeFunction · 0.85

Calls 1

makeFunction · 0.70

Tested by

no test coverage detected