Skip to content

Commit

Permalink
fix naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
goeiecool9999 committed Nov 18, 2024
1 parent 8f333a2 commit 51459ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cnping.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ void DrawFrameHistogram()
#define ELEM_SWAP(a, b) { register double t=(a);(a)=(b);(b)=t; }
#endif

double quick_select_median( double arr[], uint16_t n )
double QuickSelectMedian( double arr[], uint16_t n )
{
uint16_t low, high;
uint16_t median;
Expand Down Expand Up @@ -474,7 +474,7 @@ double quick_select_median( double arr[], uint16_t n )
return arr[median];
}

double get_median_ping()
double GetMedianPing()
{
//create array of valid ping times
double *validPingsArr = malloc( screenx * sizeof( double ));
Expand All @@ -497,7 +497,7 @@ double get_median_ping()
// calculate median
double result = 0;
if ( nValidPings > 0 )
result = quick_select_median( validPingsArr, nValidPings );
result = QuickSelectMedian( validPingsArr, nValidPings );
free( validPingsArr );

return result;
Expand Down Expand Up @@ -564,7 +564,7 @@ void DrawFrame( void )
}

double avg = totaltime / totalcountok;
double median = get_median_ping();
double median = GetMedianPing();
loss = (double) totalcountloss / (totalcountok + totalcountloss) * 100;

for( i = 0; i < screenx; i++ )
Expand Down

0 comments on commit 51459ea

Please sign in to comment.