def phaseNearTargetPhaseDeg(phase,phase_trgt):
	"""
	Adds or subtracts 360 to get the phase near the target phase.
	"""
	delta = 360.*int((phase_trgt - phase)/(360.))
	phase += delta 
	if(phase_trgt - phase > 180.): 
		phase += 360.
		return phase
	if(phase_trgt - phase < -180.):
		phase -= 360.
	return phase