I’m working on some code to compute sunrise and sunset times and the web page I’m using as a reference has a range notation that I don’t fully understand.
Here is an example:
NOTE: UT potentially needs to be adjusted into the range [0,24) by adding/subtracting 24
I had been assuming that it simply meant that if the values was less then 0 I should add 24 and if it was greater than 24 I should subtract 24 - but while testing I ran into a case where UT was 0.4 and I only got the correct answer if I added 24 to UT.
So my thinking now is that the [ and ) notation is special - where I’m supposed to round or do something strange with the fractional part. It doesn’t make a whole lot of sense to me but everything else seems fine so I’m at a loss to explain it.
I figure unless whoever wrote the page mistyped every time they wanted to enter (0,24) or [0,24] it must mean something that I’m not catching.
I tried a Google search but it is a tough thing to seach for. =)