anchor.diff:    SetLength(amp, Nmax);
     SetLength(phase, Nmax);
   
  -  //   .         
  -  j := 1;
  -  i := 0;
  -
     //   
  -  for i := 1 to Nmax - 1 do
  +  for i := 0 to Nmax - 1 do
     begin
       re := arr[i].X;
       im := arr[i].Y;
  
positive.code:     abs2 := re * re + im * im;
  
      //  . 2.0 -    
      amp[j] := 2.0 * sqrt(abs2) / N;
  
      //     
      phase[j] := ArcTan2(im, re);
  
      //    . M_PI2 = /2, M_PI = 
      //        -/2  +/2
      phase[j] := phase[j] + (PI * 0.5);
      if (phase[j] > PI) then
        phase[j] := phase[j] - 2 * PI;
  
      //      
      phase[j] := phase[j] * (180.0 / PI);
  
      //  
      freq[j] := (nSamplesPerSec * i) / N;
  
      inc(j);
    end;
  end;
  
  
negative.code:   N: Integer;
  
    //       arr
    i: Integer;
    Nmax: Integer;
  
    //   
  