001 /** 002 * Implements the CFML Function acos 003 */ 004 package railo.runtime.functions.math; 005 006 import railo.runtime.PageContext; 007 import railo.runtime.exp.ExpressionException; 008 import railo.runtime.ext.function.Function; 009 010 public final class ACos implements Function { 011 public static double call(PageContext pc , double number) throws ExpressionException { 012 if(number>=-1d && number<=1d) 013 return StrictMath.acos(number); 014 throw new ExpressionException("invalid range of argument for function aCos, argument range must be between -1 and 1, now is ["+number+"]"); 015 } 016 }