I am wondering how to generate a number in interval of [0,360) which would be also divisible by number 15. Examples: 0, 15, 30, 45, 50.. I can generate a number in the interval with:
(int)(Math.random()*360));
But I don't know how to make sure that the generated number is divisible by number 15.
Aucun commentaire:
Enregistrer un commentaire