Horizontal sundial calculations: Difference between revisions
→{{header|Java}}: Added missing variable declaration for 'hraRad'.
(→{{header|Java}}: Added missing variable declaration for 'hraRad'.) |
|||
Line 1,157:
=={{header|Java}}==
{{trans|C}} (Substitutes in atan2 for the hour line angle calculation)
<lang java>import java.util.Scanner;
public class Sundial {
public static void main(String[] args) {
Line 1,180:
for (int h = -6; h <= 6; h++) {
double hla, hra, hraRad;
hra = 15.0 * h;
hra = hra - lng + ref;
|