Hello, in my code I have a function that can only be executed if an integer isn’t equal to a multiple of 360.
var exampleNumber : int;
if(exampleNumber != // a multiple of 360)
{
// do something
}
I think I have to use arrays but I haven’t got a clue how. I’ve searched some information concering arrays but with no result.
Thanks in advance!
Instead, try making a function that returns bool type and receives the desired number as argument.
Do desired number/360
If the remainder is 0, then your number is multiple of 360 and the function returns true. Does this make any sense?
if (exampleNumber % 360 != 0)