These static casts can probably just be replaced with the result (4 and 2, right?). Not sure why these were floats to begin with.