Sunset, sunrise, twilight calculations in LC?

Earthednet-wp prothero at earthednet.org
Wed Aug 27 13:20:10 EDT 2014


Beware:
This function fails when the number is a negative integer.
Bill

> function Floor pValue
> if pValue < 0 then return trunc(pValue) - 1 else return trunc(pValue)
> end Floor

William Prothero
http://es.earthednet.org

> On Aug 27, 2014, at 9:11 AM, Bob Sneidar <bobsneidar at iotecdigital.com> wrote:
> 
> Nicely done! I love this list!!
> 
> Bob S
> 
> 
> On Aug 23, 2014, at 13:22 , Charles E Buchwald <charles at buchwald.ca<mailto:charles at buchwald.ca>> wrote:
> 
> function Floor pValue
> if pValue < 0 then return trunc(pValue) - 1 else return trunc(pValue)
> end Floor
> 
> I know this is trivial, but here's a ceiling function, just to kind of fill out the thread:
> 
> function Ceiling pValue
> if pValue < 0 then return trunc(pValue) else return trunc(pValue) + 1
> end Ceiling
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list