https://github.com/cran/fields
Raw File
Tip revision: e6e2dec9c9cc857b2226614aaf6c6642000af53c authored by Doug Nychka on 06 February 2009, 00:00:00 UTC
version 5.02
Tip revision: e6e2dec
ceiling2.r
# fields, Tools for spatial data
# Copyright 2004-2007, Institute for Mathematics Applied Geosciences
# University Corporation for Atmospheric Research
# Licensed under the GPL -- www.gpl.org/licenses/gpl.html

"ceiling2" <-
function (m) 
{
    if (m < 1) 
        return(NA)
    M <- 1
    while (M < m) {
        M <- M * 2
    }
    M
}
back to top