Added rounding for converting value to position.