round()

new topic     » topic index » view thread      » older message » newer message

Albert, this is a simple recursive routine I have been using. Most likely not
the
fastest, but it seems to work. jiri

function round(object x)
    if atom(x) then
        if x<0 then return -floor(-x+0.5)
        else return floor(x+0.5)
        end if
    else
        for i=1 to length(x) do
            x[i]=round(x[i])
        end for
        return x
    end if
end function

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu