I imagine that this is a simple question, but I\'m getting some strange results with my current code and I don\'t have the math background to fully understand why. My goal
Without more information on the exact errors it's hard to tell what's wrong. The equations look right and should work. Are you sure the angles you are passing in are correct for angles > 90 degrees? The only other thing I could think of would be that you're multiplying distance (an int) by the result of Math.sin (double) but that shouldn't really be an issue.