Sunset, sunrise, twilight calculations in LC?

Richmond richmondmathewson at gmail.com
Sat Aug 23 12:20:57 EDT 2014


On 23/08/14 19:13, Earthednet-wp wrote:
> Richmond,
> Floor of a number is the largest integer that is less than or equal to the number. For positive numbers, it would be trunc(myNumber) but for negative numbers, floor(-4.34) would have to evaluate to -5. Probably trunc(myNum-1) would almost do it, but I'm not in LC to check all cases, e.g. floor(-4.0) should be -4.
> Bill
>
> William Prothero
> http://es.earthednet.org
>
>> On Aug 23, 2014, at 8:09 AM, Richmond <richmondmathewson at gmail.com> wrote:
>>
>>> On 23/08/14 17:44, Earthednet-wp wrote:
>>> I found this link. It might be easier to convert this code to LC.
>>> http://williams.best.vwh.net/sunrise_sunset_algorithm.htm
>>> Bill
>>>
>>> William Prothero
>>> http://es.earthednet.org
>>>
>>>
>> That looks very good indeed: but I don't understand what 'floor' means.
>>
>> Richmond.
>>
>>

That "floored me" :)  Thanks for the heads up!

I just wrote this in the Message Box:

put trunc(-9.8)

and got '-9'

Richmond.




More information about the use-livecode mailing list