Notes小さなコード断片2026-07-03#AI#Toolsconst clamp = (value, min, max) => Math.min(max, Math.max(min, value)); 用途が狭い関数ほど、名前を素直にすると再利用しやすい。