Closed TheoPannetier closed 2 years ago
trunc(get_x(p)) doesn't work, I guess it is because trunc() also returns a double? Explicit type conversion works here: (int)get_x(p), and by doing this we can display only integers on the fourth panel
Note: prefer using static_cast<int>
over (int)
, see ES.49: If you must use a cast, use a named cast :-)
The numbers showing object coordinates in the top-right corner are useful, but look a bit awkward. There are a bunch of decimals printed there, yet if you run the game you'll see that their value is always zero. So these numbers don't carry any useful information for us, and impede reading. Find a way to either truncate the numbers (maybe by converting them to integers before drawing?), or make the string only display the integer part of the coordinate.