[DiscordArchive] what is the reason for making Update return timePassed?
[DiscordArchive] what is the reason for making Update return timePassed?
Archived author: Tea • Posted: 2024-06-11T18:26:36.724000+00:00
Original source
that return value thing only makes sense if you are resetting the state to 0 in Update instead of doing -= m_internal
Archived author: Takenbacon • Posted: 2024-06-11T18:27:58.477000+00:00
Original source
my original implementation did reset to 0 before I decided that was stupid
Archived author: Takenbacon • Posted: 2024-06-11T18:28:03.510000+00:00
Original source
so yeah that'd make sense
Archived author: Tea • Posted: 2024-06-11T18:31:00.731000+00:00
Original source
with -=, the only return value that makes sense is m_interval itself, which at this point is just be a yes/no bool
Archived author: chipzz • Posted: 2024-06-12T13:58:04.972000+00:00
Original source
Why do you have setters and getters which don't add anything? If you're not checking your input values or enforcing any constraints, they're useless, and you might as well make m_interval public instead of private