Why does the book still use lroundf()
to cast a float to an Int instead of simple use Int()
?
currentValue = lroundf(slider.value)
Why does the book still use lroundf()
to cast a float to an Int instead of simple use Int()
?
currentValue = lroundf(slider.value)
Good question.
I have no association with the book, but I will put in my 2 cents by sharing an assumption: the rounding: