round and statRound

Dennis Brown see3d at writeme.com
Wed Apr 13 15:36:22 EDT 2005


How does this work with even values 1,2,3
you would need to add just less than 1 or test that the number and the 
trunc are not the same

function ceil pVal
  if trunc(pVal) = pVal then return pVal
   else return trunc(pVal)+1
  end if
end ceil

Dennis

On Apr 13, 2005, at 3:24 PM, Alex Tweedly wrote:

> Alex Tweedly wrote:
>
>> Don't think there's one built-in.
>>
>> function ceil pVal
>>  return ceil(pVal)+1
>> end ceil
>>
> Sorry - I meant
>    return trunc(pVal)+1
>
> -- 
> Alex Tweedly       http://www.tweedly.net
>
>
>
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.9.7 - Release Date: 12/04/2005
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list