How to add rotation to current rotation over time?

I want to add a rotation to the current rotation of an object every time when I press the mouse-button. However there are some issues regarding the rotation behaviour e.g. when the local rotation amount is set greater 90, it lerps back after one iteration.

This is what my script looks like:

public bool lerping;
public float lerpSpeed;
public Vector3 localRotAmount;
private Vector3 startRot;
private Vector3 endRot;
private float ratio;

void InitRot(){
    startRot = transform.eulerAngles;
    endRot = startRot + localRotAmount;
}

void OnMouseDown() {
    if(lerping)
        return;
    lerping = true;
    ratio = 0f;
    InitRot();
}

void Update(){
    if(lerping){
        ratio += lerpSpeed * Time.deltaTime;

        transform.eulerAngles = Vector3.Lerp(startRot, endRot, ratio);

        if(ratio >= 1f)
            lerping = false;
    }
}

I think that using eulerAngles for rotation-setting might be not powerful enough against using quaternions, however I am not sure how to handle with them in order to resolve this problem.

If you want to use Quernions simply change all the vectors through Quaternion.Euler(Vector3) and use Quaternion.Lerp, tho I’m not sure if this is the solution you are looking for.

Nevermind, found the solution by changing startRot/endRot to Quaternions and using

endRot = startRot * Quaternion.Euler(localRotAmount);