Math problem
Bob Sneidar
bobs at twft.com
Fri Feb 17 22:21:53 EST 2012
This is beginning to look Disturbingly like regex!
Sent from my iPad
On Feb 17, 2012, at 7:13 PM, "Peter M. Brigham, MD" <pmbrig at gmail.com> wrote:
> On Feb 17, 2012, at 6:39 PM, Geoff Canyon Rev wrote:
>
>> My original function took the number to be rounded and the increment to
>> round up to, so I think your version would become:
>>
>> function roundUp x,i -- rounds x up to the next i
>> return x div i * i + item itemoffset((x mod i > 0),"true,false") of (i,0)
>> end roundUp
>>
>> On Fri, Feb 17, 2012 at 1:49 PM, Peter M. Brigham, MD <pmbrig at gmail.com>wrote:
>>
>>> function roundUp x
>>> return trunc(x) + char itemoffset((x mod 1 > 0),"true,false") of "10"
>>> end roundUp
>
> Sweet!
>
> -- Peter
>
> Peter M. Brigham
> pmbrig at gmail.com
> http://home.comcast.net/~pmbrig
>
>
> _______________________________________________
> 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