Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private double getAlpha(double x, double y)
- {
- /* Calculates alpha value according to given (x, y) coordinates using trigonometry.
- Defines a special case for when x's value is 0. */
- if (x != 0)
- {
- double alpha = Math.atan(y / x) / Math.PI * 180;
- return Math.round(alpha * 10000) / (double) 10000;
- }
- else
- return 90.0;
- } // End of private method getAlpha
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement