Use clamp for clampScalar implementation