(a: bigint, b: bigint, bits: number)
| 63 | |
| 64 | /** Fixed-point multiply on the base-2 grid: (a * b) >> bits */ |
| 65 | export function fpmul(a: bigint, b: bigint, bits: number): bigint { |
| 66 | return (a * b) >> BigInt(bits); |
| 67 | } |
| 68 | |
| 69 | /** Fixed-point divide on the base-2 grid: (a << bits) / b */ |
| 70 | export function fpdiv(a: bigint, b: bigint, bits: number): bigint { |
no outgoing calls
no test coverage detected