Rotate from 360 to 0 without going backwards? C#

Good Afternoon, I am animating a rotation and I am running into a problem when the rotation value goes from 360 down to zero or the other way around. I would like for the rotation to go from 360 to zero without having to animate backwards to get to zero.

Current Code:

transform.eulerAngles = new Vector3(0, 0, angle);

i had the same problem with large rotations to.

this is a polynomial interpolation since each axis is interpolated independently but in general it work well

put this in a public static class so you can use it from anywhere
you can use a standard lerp if you dont want the smoothing.

public static IEnumerator InterpolateRotationSmooth(Transform obj, Vector3 destinationRotation, float overTime)
		Vector3 source = new Vector3(obj.localRotation.eulerAngles.x,obj.localRotation.eulerAngles.y,obj.localRotation.eulerAngles.z);

		float startTime = Time.time;
		while(Time.time < startTime + overTime && obj != null)
			float timePer = (Time.time - startTime) / overTime;

			obj.localEulerAngles = new Vector3 (Mathf.SmoothStep (source.x, destinationRotation.x, timePer), Mathf.SmoothStep (source.y, destinationRotation.y, timePer), Mathf.SmoothStep (source.z, destinationRotation.z, timePer));
			//obj.localEulerAngles = Vector3.Lerp(source,destinationRotation,(Time.time - startTime)/overTime);
			yield return null;

		obj.localEulerAngles = destinationRotation;