comparison FloatHist.c @ 15:32489b8b763c

added MC_shared brch
author Me@portablequad
date Sat, 11 Feb 2012 19:20:37 -0800
parents 1fbaedaac2c7
children f4d96eaf374a
comparison
equal deleted inserted replaced
4:39b532345c04 5:e7462a8a2fc6
24 makeFloatHistogram( int32 numBins, float32 startOfRange, float32 binWidth ) 24 makeFloatHistogram( int32 numBins, float32 startOfRange, float32 binWidth )
25 { 25 {
26 FloatHist *hist; 26 FloatHist *hist;
27 int i; 27 int i;
28 28
29 hist = malloc( sizeof(FloatHist) ); 29 hist = VMS__malloc( sizeof(FloatHist) );
30 hist->bins = malloc( numBins * sizeof(int) ); 30 hist->bins = VMS__malloc( numBins * sizeof(int) );
31 31
32 hist->numBins = numBins; 32 hist->numBins = numBins;
33 hist->binWidth = binWidth; 33 hist->binWidth = binWidth;
34 hist->endOfRange = startOfRange + hist->binWidth * numBins; 34 hist->endOfRange = startOfRange + hist->binWidth * numBins;
35 hist->startOfRange = startOfRange; 35 hist->startOfRange = startOfRange;
98 98
99 99
100 void 100 void
101 freeFloatHist( FloatHist *hist ) 101 freeFloatHist( FloatHist *hist )
102 { 102 {
103 free( hist->bins ); 103 VMS__free( hist->bins );
104 free( hist ); 104 VMS__free( hist );
105 } 105 }