Notes

小さなコード断片

const clamp = (value, min, max) => Math.min(max, Math.max(min, value));

用途が狭い関数ほど、名前を素直にすると再利用しやすい。