So i was messing around and testing some things and i made this absolutelly useless programm. So i wanted to learn to use the rand function and to calculate the cosine, so i made this programm which generates a random number between 0 to 180 and then outputs, the cosine value of that number. But the thing i noticed is that every time that number is larger then the previous time. So when it gets close to 180 it starts from the first number again to the top. So does anyone know if this is a somekind of bug or is there a better way to generate a random number.So that it won't output only higher then the previous.