Get value left of 0, right of 360 (rotation)

I have this at the moment, and it works. But I suspect the code could be more elegant. Thanks for any help.

int numberOnLeft(int number){
	int ret;
	if (number == 0) {
		ret = 360;
	} else {
		ret = number - 1;
	}
	return ret;
}

int numberOnRight(int number){
	int ret;
	if (number == 360) {
		ret = 0;
	} else {
		ret = number + 1;
	}
	return ret;
}

Is it correct that you want to wrap around the number between 0 and 360? If so, I think you can try this function.

public float WrapAngle(float angle)
{
	if (angle >= 0 && angle <= 360)
	{
		return angle;	
	}
	
	while (angle < 0)
	{
		angle += 360;	
	}
	
	while (angle > 360)
	{
		angle -= 360;	
	}
	
	return angle;
}