Horizontal sundial calculations: Difference between revisions

Content added Content deleted
(+Haskell)
(Logo)
Line 378: Line 378:
HR= 5; HRA= 75.500; HLA= -18.451
HR= 5; HRA= 75.500; HLA= -18.451
HR= 6; HRA= 90.500; HLA= 84.225</pre>
HR= 6; HRA= 90.500; HLA= 84.225</pre>

=={{header|Logo}}==
<lang logo>type "|Enter latitude: |
make "lat readword
type "|Enter longitude: |
make "long readword
type "|Enter legal meridian: |
make "long :long - readword

print [Hour : HourAngle , DialAngle]
for [hour -6 6] [
make "hra 15 * :hour - :long
make "hla arctan product sin :lat quotient sin :hra cos :hra
print (sentence "hour :hour ": :hra ", :hla)
]</lang>


=={{header|OCaml}}==
=={{header|OCaml}}==