squiggle/packages/components/src/lib/distributionUtils.ts

6 lines
180 B
TypeScript
Raw Normal View History

2022-07-22 19:24:49 +00:00
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);