This commit is contained in:
2022-10-23 22:45:55 -07:00
parent ff2fa4e474
commit 239acf2699
32 changed files with 398 additions and 252 deletions

View File

@ -74,12 +74,12 @@ internal abstract class Mapping
return new(id, normalizedPixelPercentage, mappingCollection);
}
internal static int GetAreaPermille(int bottom, int height, int left, int right, int top, int width)
internal static int GetAreaPermille(int faceAreaPermille, 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);
result = (int)Math.Round(locationArea / area * faceAreaPermille, 0);
return result;
}