001 /** 002 * Implements the Cold Fusion Function sgn 003 */ 004 package railo.runtime.functions.math; 005 006 import railo.runtime.PageContext; 007 import railo.runtime.ext.function.Function; 008 009 public final class Sgn implements Function { 010 public static double call(PageContext pc , double number) { 011 return number != 0.0d ? number >= 0.0d ? 1 : -1 : 0; 012 } 013 }