aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/makemhr/loadsofa.cpp10
-rw-r--r--utils/sofa-info.cpp10
2 files changed, 18 insertions, 2 deletions
diff --git a/utils/makemhr/loadsofa.cpp b/utils/makemhr/loadsofa.cpp
index 49d16556..c91613c8 100644
--- a/utils/makemhr/loadsofa.cpp
+++ b/utils/makemhr/loadsofa.cpp
@@ -149,9 +149,17 @@ static double GetUniformStepSize(const double epsilon, const uint m, const doubl
count = 1;
if(counts[0] > m/2)
- return steps[0];
+ break;
}
+ if(counts[0] > 255)
+ {
+ uint i{2u};
+ while(counts[0]/i > 255 && (counts[0]%i) != 0)
+ ++i;
+ counts[0] /= i;
+ steps[0] *= i;
+ }
if(counts[0] > 5)
return steps[0];
return 0.0;
diff --git a/utils/sofa-info.cpp b/utils/sofa-info.cpp
index a0ed9ff4..bc5b709a 100644
--- a/utils/sofa-info.cpp
+++ b/utils/sofa-info.cpp
@@ -174,9 +174,17 @@ static double GetUniformStepSize(const double epsilon, const uint m, const doubl
count = 1;
if(counts[0] > m/2)
- return steps[0];
+ break;
}
+ if(counts[0] > 255)
+ {
+ uint i{2u};
+ while(counts[0]/i > 255 && (counts[0]%i) != 0)
+ ++i;
+ counts[0] /= i;
+ steps[0] *= i;
+ }
if(counts[0] > 5)
return steps[0];
return 0.0;