I am experimenting with a creative javascript framework P5.js and often times I'm using degrees to rotate a sphere. However, I do this by continuously increasing a variable and basing the rotation off of that variable. Is it a bad practice to infinitely increase a variable? Should I reset the rotation to 0 when it hits 360?
Example:
this.deg = 0;
this.show = function(){
rotateY(radians(this.deg));
sphere(this.x, this.y, this.r);
this.deg++; // Continuously increasing the deg :(
}