An angle of pi/2 radians can be transformed into degrees using the conversion formula (180/pi):
φ = (pi / 2) * (180 / pi) = 90˚
Therefore an angle of pi/2 rad is just equivalent to 90˚.
Since 90˚ is located on the y-axis, therefore the horizontal component x is zero. So cosine of this angle is zero.