Several Patterns for Handling States in C++July 02, 2023 (Last Modified: November 27, 2023)Translations: JAIn programming, it is often necessary to control some form of state. This article summarizes several patterns for managing states.
The Superstition of Adding 0.5 Then Casting to int for Rounding a Float ValueOctober 11, 2022 (Last Modified: July 02, 2023)Translations: JATo round a float value, adding 0.5 then casting to int is an amateur approach. Professionals use std::nearbyint.