How can I limit objects rotation to fixed range of 0 to 1? 0 being no rotation 1 full rotation?

I would like to control rotation with a range of 0 and 1. Whenever it’s 0 then the object for rotation is at its default state and when the range is increased it starts rotating and when its at 1 it reaches full 360 rotation then resets to default … is this possible to do

having the range as float and having the variable adjustable for better control is what I’m trying to accomplish.

a draft solution to this would be something like

    public float rotRange;//0-1
    float resultRot;//0-360
    float speed = 1f;
    void Update()
    {
        //auto rotate test
        //rotRange += Time.deltaTime * speed;

        if (rotRange > 1 || rotRange < 0) rotRange = 0;
        resultRot = rotRange * 360f;
        transform.rotation = Quaternion.Euler(0, Math.Abs(resultRot), 0);
        Debug.Log(resultRot);
    }

just change the rotRange to see the result.