The cotangent is correct, but it looks like you confused cosine with sine. Remember that cosine is adjacent side over hypotenuse.