int と floatの違いは整数だけか少数も扱えるかの違いです。
数字はわかりますが、実際に動かすと動きが明確で、floatにすることでぬるぬるっと動かすことができます。
An int stores only whole numbers, while a float can store numbers with decimal places. This is especially important when programming character movement. Using an int updates the position only in while-number steps, so the movement may appear choppy. Using a float allows the position to change by small fractional amounts, resulting in much smoother movement.
次回
