docs: static
  	private Double toDouble(Object value){
  
  		if(value instanceof Double){
  			return (Double)value;
  		} else
  
  		if((value instanceof Float) || (value instanceof Long) || (value instanceof Integer) || (value instanceof Short) || (value instanceof Byte)){
  			Number number = (Number)value;
  
  			return toDouble(number.doubleValue());
  		} else
  
  		if(value instanceof Boolean){
  			Boolean flag = (Boolean)value;
  
  			return (flag.booleanValue() ? Numbers.DOUBLE_ONE : Numbers.DOUBLE_ZERO);
  		} else
  
  		if((value instanceof DaysSinceDate) || (value instanceof SecondsSinceDate) || (value instanceof SecondsSinceMidnight)){
  			Number number = (Number)value;
  
  			return toDouble(number.doubleValue());
  		}
  
  		throw new TypeCheckException(DataType.DOUBLE, value);
  	}