Clamps a position to the visible viewport with optional padding.
The position to clamp
Optional
Optional padding from the viewport edges (default 0)
The clamped position
Clamps a position to the visible viewport with optional padding.