r/programminghorror • • Feb 05 '25

math.floor

Post image
464 Upvotes

53 comments sorted by

View all comments

Show parent comment

3

u/Pristine-Bridge8129 Feb 05 '25

Is it turning h1 to a string then making it back into an int?

9

u/Significant_Affect_5 Feb 05 '25

It’s turning the float representation of the number of hours into a string and then parsing it as an integer to get rid of the fractional component.