It might just be cause I come from other language backgrounds but it seems like a missed opportunity not to include an extra tip about using the simplified NOT (!
) operator as a follow up bit of info:
while(!WindowShouldClose()) {
BeginDrawing();
ClearBackground(RED);
EndDrawing();
}
For anyone who reads this and is confused what is going on here a !
before any value inverts it’s normal boolean value so !true
would actually equal false
and !false
would equal true
same is true for any other math operators or functions that return boolean if you want the inverse answer. makes writing if and while statements much cleaner than WindowShouldClose() == false
.
sorry for the detour, back to your lessons