squiggle/packages/components/src/lib/distributionUtils.ts
2022-07-22 23:24:49 +04:00

6 lines
180 B
TypeScript

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