export const saturate = (x: number) => Math.min(Math.max(x, 0.0), 1.0);