Mostly 1:1, I had to fix a few places where the automatic conversion did not infer the right kotlin types, and places where it tried to convert to `double` instead of using `float` like the original. Everything else is the result of automatic conversion.