On 8/23/2014, 1:28 PM, Richmond wrote:
On 23/08/14 21:13, Charles E Buchwald wrote:
So I'm thinking...

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

Quite unnecessary when 'round' does the trick without
any homegrown functions.


Nope. The floor of -2.2 is -3. The round is -2.

Charles' function works except for negative integers. I think it needs to check for that.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to