Sunset, sunrise, twilight calculations in LC?

Charles E Buchwald charles at buchwald.ca
Sat Aug 23 14:13:53 EDT 2014


So I'm thinking...

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

On 23 Aug 2014, at 1:05 PM, Richmond <richmondmathewson at gmail.com> wrote:

> On 23/08/14 20:44, J. Landman Gay wrote:
>> On 8/23/2014, 11:20 AM, Richmond wrote:
>>> That "floored me" :)  Thanks for the heads up!
>>> 
>>> I just wrote this in the Message Box:
>>> 
>>> put trunc(-9.8)
>>> 
>>> and got '-9'
>> 
>> The correct answer for "floor" would be -10. It's the largest integer that is less than the test number.
>> 
> 
> put round(-9.8_
> 
> give us 10
> 
> Yo!
> 
> Richmond.
> 
> _______________________________________________
> 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

--
Charles E. Buchwald
CEO/Director General
Museografica Digital
http://digital.museografica.com

Mac OSX 10.9.4, LC 6.6.2 Commercial

LC Developer Tools: http://buchwald.ca/developer-tools/

Email Notice: http://wp.me/P3aT4d-33





More information about the use-livecode mailing list