Face Distance Area Permille Tolerance

This commit is contained in:
2022-09-27 15:50:52 -07:00
parent abe6c80d82
commit 152612bacb
17 changed files with 115 additions and 10 deletions

View File

@ -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;
}
}