001    /**
002     * Implements the CFML Function bitshrn
003     */
004    package railo.runtime.functions.math;
005    
006    import railo.runtime.PageContext;
007    import railo.runtime.exp.FunctionException;
008    import railo.runtime.ext.function.Function;
009    
010    public final class BitSHRN implements Function {
011            
012            public static double call(PageContext pc , double dnumber, double dcount) throws FunctionException {
013                    int number=(int) dnumber,count=(int) dcount;
014                    if(count > 31 || count < 0)
015                            throw new FunctionException(pc,"bitSHRN",2,"count","must be beetween 0 and 31 now "+count);
016                    
017                    return number >>> count;
018            }       
019    }