Created function DoubleToInteger