Fixed roundStep to work with irregular floor and step values