swing phase calculation for inside bounds