Commit c74b2821 authored by Daniel Lehmberg's avatar Daniel Lehmberg
Browse files

account for numerical differences and more info in error msg

parent 8babffa5
Pipeline #66847 failed with stages
in 55 minutes and 43 seconds
......@@ -77,9 +77,9 @@ public class Face {
* (limits.yHigh - limits.yLow);
try {
if (result < 0 || result > maxArea) {
String message = result + " is a illegal area size (Object "
+ id + ").";
if (result < 0 || Math.abs(result-maxArea) > 1E-15) {
String message = "(Object " + id + ") Area of face is: " + result + ". This is an illegal area size " +
"because result has to be positive and less than maxArea (= " + maxArea + ")";
throw new IllegalStateException(message);
}
} catch (IllegalStateException e) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment