cos(45)=1/2 or squrt(2)/2

1/sqrt(2) = sqrt(2)/2

You would do well to memorize the trig values for angles of
0,30,45,60,90 degrees
They pop up all the time