Why parentheses

Hi!

Random Q:

When assigning a value to the bool timerFinished, why does Rick use parentheses? IE:

bool timerFinished = (Time.timeSinceLevelLoad >= levelTime);

From testing, it seems the above statement works just as well without parentheses. IE:

bool timerFinished = Time.timeSinceLevelLoad >= levelTime;

Just curious as to what Rick’s reasoning behind the parentheses was?

Many thanks.

1 Like

I don’t think there’s any particular reason to do that and as you said, there’s no need to use parentheses in there, I suppose it was an error, perhaps Rick tried something before that needed the parentheses and the idea stick into his head, who knows.

Thanks for the explanation, Yee!

Privacy & Terms