Haptic: Explicitly avoid floating point arithmetic if it's not needed. Thanks, Elias! Partially fixes Bugzilla #2686.