An act committed while in a state of voluntary intoxication is not less criminal by reason thereof, but when a particular intent or other state of mind is a necessary element to constitute a particular crime, the fact of intoxication may be taken into consideration in determining such intent or state of mind.