Restrict Distance

I am pulling back a signshot and want to restrict the distance I can pull it back. What's the best way of going about this?
Currently I just have a basic...
posX = mousePosX
posy = mousePosY
Rotation = Vec2Angl(posx-mousex,posy-mousey)
Currently I just have a basic...
posX = mousePosX
posy = mousePosY
Rotation = Vec2Angl(posx-mousex,posy-mousey)