Clamps a point to lie inside bounds along both axes.
bounds
Position with x and y in world units.
x
y
Valid rectangle (min ≤ max per axis).
min
max
Same point if inside, otherwise clamped to the nearest edge.
Callers: server PlayWorld path enrichment; play-ui joystick and preview. Callees: Math.min/Math.max.
PlayWorld
Math.min/Math.max
Clamps a point to lie inside
boundsalong both axes.