Skip to content

Commit

Permalink
Merge pull request #48 from Sam-Tygier/sam-dev-fixes
Browse files Browse the repository at this point in the history
Don't mix math.h and cmath.
  • Loading branch information
scottmrowan authored Mar 6, 2020
2 parents b3caa52 + 892dbdf commit a61e618
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion DeveloperTools/CodeTesting/ScatteringTests/cu50_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ int main(int argc, char* argv[])
double coords[] = {ip->x(), ip->xp(), ip->y() - y_offset, ip->yp(), -ip->dp()};
for(int i = 0; i < 5; i++)
{
if(isnan(coords[i])) continue; // RJB
if(std::isnan(coords[i]))
continue; // RJB
// beware, this can rollover when x is big
int bin_x = ((coords[i] - bin_mins[i]) / (bin_maxs[i] - bin_mins[i]) * (nbins)) + 1; // +1 because bin zero for outliers
// so handle end bins, by check against x, not bin
Expand Down
1 change: 0 additions & 1 deletion Merlin++/Aperture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <string>
#include <vector>
#include <map>
#include <math.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include <algorithm>
Expand Down
1 change: 0 additions & 1 deletion Merlin++/Aperture.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <iostream>
#include <string>
#include <map>
#include <math.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include "DataTable.h"
Expand Down
2 changes: 1 addition & 1 deletion Merlin++/AxisRotations.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define AxisRotations_h 1

#include "merlin_config.h"
#include <math.h>
#include <cmath>
#include "Space3D.h"
#include "RotationType.h"
#include "Rot3Drep.h"
Expand Down
2 changes: 1 addition & 1 deletion Merlin++/CollimatorPotentialModels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* This file is derived from software bearing the copyright notice in merlin4_copyright.txt
*/

#include <math.h>
#include <cmath>

#include "CollimatorPotentialModels.h"

Expand Down

0 comments on commit a61e618

Please sign in to comment.