module: save_double_interp_transition_value
description: 
parameters:  int edge_type
inputs:  double_interp in
outputs:  double out
classes:  
static_variables:  double prev_in;
init:  
if (edge_type != -1 && edge_type != 1)
  {
   printf("error in 'save_double_interp_transition_value':\n");
   printf("  parameter 'edge_type' must be -1 or 1\n");
   printf("  in this case, edge_type was specified as '%d'\n",edge_type);
   printf("  -> please fix this issue in your schematic\n");
   exit(1);
  }
out = 0.0;
code:  

if (edge_type == -1)
  {
   if (prev_in == 1.0 && in != 1.0)
      out = in;
  }
else
  {
   if (prev_in == -1.0 && in != -1.0)
      out = in;
  }

prev_in = in;


