Finding sine from cosine and quadrant