convert direction from int to float