The problem is that the curveangle command was intended for use with floats, and so what you see here is a side effect of dropping the decimal digits when casting from float to integer. Similarly to the curvevalue command, it seems the equation used by curveangle is somewhere along the lines of:
resultangle = currentangle + ( ( destinationangle - currentangle ) / speedvalue )
When rotating from 300 to 100, curveangle attempts to take the shortest path by increasing the angle with the intent of wrapping back around to complete the transition (300->359->0->100). Because your speed value is set to 100, when the current angle = 0 the result returned by curveangle is 1 because:
resultangle = 0+( (100-0) /100) = 0+(100/100) = 0+1 = 1
However during the next iteration (where currentangle=1), the calculation becomes:
resultangle = 1+( (100-1) /100) = 1+(99/100) = 1+0.99 = 1.99
Now when attempting to store the floating-point value of 1.99 within an Integer, everything after the decimal point is dropped and becomes a value of 1.