FocusModel

This commit is contained in:
2023-02-26 18:17:20 -07:00
parent 0f025b5e2e
commit 70c9ee5781
24 changed files with 286 additions and 176 deletions

View File

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