Face Distance Area Permille Tolerance
This commit is contained in:
@ -78,4 +78,13 @@ internal abstract class Mapping
|
||||
return new(id, normalizedPixelPercentage, faces);
|
||||
}
|
||||
|
||||
internal static int GetAreaPermille(int bottom, int height, int left, int right, int top, int width)
|
||||
{
|
||||
int result;
|
||||
double area = width * height;
|
||||
double locationArea = (right - left) * (bottom - top);
|
||||
result = (int)Math.Round(locationArea / area * 1000, 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user