In a car i would try to avoid it. If you could eat it in a single sitting, don't swerve.
On a bike I would rather take my chances hitting it than throwing my bike and myself in the ditch or into a guardrail. Stand it up as much as possble, stay off the brakes and just hit it. Stupid deer. If i'm goin down i'm taking you with me!
I've found trying to avoid a deer either has you hitting it anyways and you're now in the middle of an emergency maneuver and you've just hit something or you end up in the ditch with an at fault claim. I always aim for the deer, they'll move, if they don't then you're hitting them square on your bike and not a glancing blow, better odds of surviving that (plenty of vids on youtube of people that have hit deer head on). moose on the other hand... their ribs will act as a strainer.