ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/tcProps/readWrite.c
(Generate patch)

Comparing trunk/tcProps/readWrite.c (file contents):
Revision 1080 by mmeineke, Wed Mar 3 15:16:15 2004 UTC vs.
Revision 1085 by mmeineke, Fri Mar 5 03:10:29 2004 UTC

# Line 631 | Line 631 | double scanSmallestZ(int startFrame){
631  
632    return smallest;
633   }
634 +  
635 + double calcAverageXY( double startTime ){
636    
637 +  int i, count, startFrame, startFound;
638 +  double avg;
639 +
640 +  startFound = 0;
641 +  startFrame = -1;
642 +  while( !startFound ){
643 +
644 +    startFrame++;
645 +
646 +    if(startFrame >= nFrames){
647        
648 +      fprintf( stderr,
649 +               "Start Time, %G, was not found in the dump file.\n",
650 +               startTime );
651 +      exit(0);
652 +    }
653 +    
654 +    if(startTime <= frameTimes[startFrame])
655 +      startFound = 1;
656 +
657 +
658 +  }
659 +
660 +  avg = 0.0;
661 +  count = 0;
662 +  for(i=startFrame;i<nFrames;i++){
663 +    avg += posArray[i].Hmat[0][0] * posArray[i].Hmat[1][1];
664 +    count++;
665 +  }
666 +  avg /= (double)count;
667 +
668 +  return avg;
669 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines