The trick is to turn the 945 degrees angle into a manageable angle
945/360 = 2.625 we have an angle equal to 945-720 = 225 degrees, this is an angle located in the third quadrant with the functions of 45 degrees but sin is negative and cosine is negative etc.