Move UI based on player movement

Hello guys.

I hope someone can help me.

I have my player rotate from 0 to 180, and i want to move mu UI to allow it to stay in a certain position near player head… i thought to clamp player rotation in a range of 0-1 then move my UI from -5 to 5 based on the player position, -5 for bottom position and 5 top one…
But i can’t figure out to how clamp it…
Anyone can help me?

if(_playerAngle[id] >= 0)
{
_target[id] = _playerAngle[id] / 360;
float FixedY = Mathf.Lerp(12f,13f,_target[id]);
Vector3 fixedPos = new Vector3(_iconObject[id].transform.position.x,FixedY,_iconObject[id].transform.position.z);
_iconObject[id].transform.position = fixedPos;
}
else
{
_target[id] = (360 + _playerAngle[id]) / 360;
float FixedY = Mathf.Lerp(12f,13f,_target[id]);
Vector3 fixedPos = new Vector3(_iconObject[id].transform.position.x,FixedY,_iconObject[id].transform.position.z);
_iconObject[id].transform.position = fixedPos;
}

this is what i have