I have some problems with memory. Is it possible to reduce memory of compiled program in this function?
It makes some calculations with time variables {hh,mm,ss.0} and returns time (in millis) that depends on current progress (_SHOOT_COUNT)
unsigned long hour_koef=3600000L;
unsigned long min_koef=60000;
unsigned long timeToMillis(int* time)
{
  return (hour_koef*time[0]+min_koef*time[1]+1000*time[2]+100*time[3]);
}
float Func1(float x)
{
  return (x*x)/(x*x+(1-x)*(1-x));
}
float EaseFunction(byte percent,byte type)
{
  if(type==0)
    return Func1(float(percent)/100); 
}
unsigned long DelayEasyControl()
{
  long dd=timeToMillis(D1); 
  long dINfrom=timeToMillis(Din);
  long dOUTto=timeToMillis(Dout);
  if(easyINmode==0 && easyOUTmode==0) return dd;
  if(easyINmode==1 && easyOUTmode==0)
  {
    if(_SHOOT_COUNT<duration) return (dINfrom+(dd-dINfrom)*EaseFunction(_SHOOT_COUNT*100/duration,0));
    else return dd;
  } 
  if(easyOUTmode==1)
  {
    if(_SHOOT_COUNT>=_SHOOT_activation && _SHOOT_activation!=-1)
    {   
      if((_SHOOT_COUNT-_SHOOT_activation)<current_settings.delay_easyOUT_duration) return (dOUTto-(dOUTto-dd)*(1-EaseFunction((_SHOOT_COUNT-_SHOOT_activation)*100/duration,0)));
      else return dOUTto;
    } 
    else 
    {
      if(easyINmode==0) return dd;
      else if(_SHOOT_COUNT<duration) return (dINfrom+(dd-dINfrom)*EaseFunction(_SHOOT_COUNT*90/duration,0));
      else return dd;
    }
  }
}
 
     
     
    