Finite real value of a number literal, or `undefined` if not a literal.
(x: Expression)
| 48 | function distOps(dist: Expression): ReadonlyArray<Expression> { |
| 49 | return isFunction(dist) ? dist.ops : []; |
| 50 | } |
| 51 | |
| 52 | /** Finite real value of a number literal, or `undefined` if not a literal. */ |
| 53 | function litVal(x: Expression): number | undefined { |
| 54 | if (isNumber(x) && x.im === 0 && x.isFinite === true) return x.re; |
| 55 | return undefined; |
| 56 | } |
no test coverage detected