Mercurial > hg > vamp-plugin-sdk
comparison examples/SpectralCentroid.cpp @ 48:f46bf5e0fa42
* isnan -> std::isnan, likewise isinf
author | cannam |
---|---|
date | Thu, 25 Jan 2007 13:39:31 +0000 |
parents | be8fdfe25693 |
children | aa64a46320d4 |
comparison
equal
deleted
inserted
replaced
47:be8fdfe25693 | 48:f46bf5e0fa42 |
---|---|
155 float centroidLin = float(numLin / denom); | 155 float centroidLin = float(numLin / denom); |
156 float centroidLog = powf(10, float(numLog / denom)); | 156 float centroidLog = powf(10, float(numLog / denom)); |
157 | 157 |
158 Feature feature; | 158 Feature feature; |
159 feature.hasTimestamp = false; | 159 feature.hasTimestamp = false; |
160 if (!isnan(centroidLog) && !isinf(centroidLog)) { | 160 if (!std::isnan(centroidLog) && !std::isinf(centroidLog)) { |
161 feature.values.push_back(centroidLog); | 161 feature.values.push_back(centroidLog); |
162 } | 162 } |
163 returnFeatures[0].push_back(feature); | 163 returnFeatures[0].push_back(feature); |
164 | 164 |
165 feature.values.clear(); | 165 feature.values.clear(); |
166 if (!isnan(centroidLin) && !isinf(centroidLin)) { | 166 if (!std::isnan(centroidLin) && !std::isinf(centroidLin)) { |
167 feature.values.push_back(centroidLin); | 167 feature.values.push_back(centroidLin); |
168 } | 168 } |
169 returnFeatures[1].push_back(feature); | 169 returnFeatures[1].push_back(feature); |
170 } | 170 } |
171 | 171 |