WholePercentages

This commit is contained in:
2023-06-21 07:24:32 -07:00
parent 8863fd763f
commit 1d0506d74c
22 changed files with 254 additions and 255 deletions

View File

@ -8,13 +8,13 @@ internal abstract class Sorting
Models.Sorting result;
if (faceDistanceLength.Length is null)
throw new NotSupportedException();
if (faceDistanceLength.NormalizedRectangle is null)
if (faceDistanceLength.WholePercentages is null)
throw new NotSupportedException();
TimeSpan timeSpan = new(faceDistanceLength.DateTimeOriginalThenMinimumDateTime.Ticks - faceDistanceEncoding.DateTimeOriginalThenMinimumDateTime.Ticks);
bool older = timeSpan.TotalMilliseconds < 0;
int daysDelta = (int)Math.Round(Math.Abs(timeSpan.TotalDays), 0);
int distancePermyriad = (int)(faceDistanceLength.Length.Value / rangeDistanceTolerance * faceDistancePermyriad);
result = new(daysDelta, distancePermyriad, faceDistanceLength.Id, faceDistanceLength.NormalizedRectangle.Value, older);
result = new(daysDelta, distancePermyriad, faceDistanceLength.Id, older, faceDistanceLength.WholePercentages.Value);
return result;
}