def aoi_projection(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth):
projection = (<EOL>tools.cosd(surface_tilt) * tools.cosd(solar_zenith) +<EOL>tools.sind(surface_tilt) * tools.sind(solar_zenith) *<EOL>tools.cosd(solar_azimuth - surface_azimuth))<EOL>try:<EOL><INDENT>projection.name = '<STR_LIT>'<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT>return projection<EOL>
Calculates the dot product of the sun position unit vector and the surface
normal unit vector; in other words, the cosine of the angle of incidence.

Usage note: When the sun is behind the surface the value returned is
negative.  For many uses negative values must be set to zero.

Input all angles in degrees.

Parameters
----------
surface_tilt : numeric
    Panel tilt from horizontal.
surface_azimuth : numeric
    Panel azimuth from north.
solar_zenith : numeric
    Solar zenith angle.
solar_azimuth : numeric
    Solar azimuth angle.

Returns
-------
projection : numeric
    Dot product of panel normal and solar angle.