squiggle/packages/components/src/lib/distributionUtils.ts
2022-08-28 21:33:16 +04:00

6 lines
184 B
TypeScript

import { SqShape } from "@quri/squiggle-lang";
export const hasMassBelowZero = (shape: SqShape) =>
shape.continuous.some((x) => x.x <= 0) ||
shape.discrete.some((x) => x.x <= 0);