Removed both
faceDistanceLength.Length.Value / distanceTolerance and confidence / rangeFaceConfidence[1] Removed ReviewLocationContainerDistanceTolerance Added MoveToDecade IFaceDistance.MappingFromFilterPost ISorting.CanReMap
This commit is contained in:
@ -3,9 +3,11 @@ namespace View_by_Distance.Shared.Models.Stateless.Methods;
|
||||
internal abstract class Sorting
|
||||
{
|
||||
|
||||
internal static Models.Sorting Get(int faceDistancePermyriad, float distanceTolerance, Models.FaceDistance faceDistanceEncoding, Models.FaceDistance faceDistanceLength)
|
||||
internal static Models.Sorting Get(int faceDistancePermyriad, Models.FaceDistance faceDistanceEncoding, Models.FaceDistance faceDistanceLength)
|
||||
{
|
||||
Models.Sorting result;
|
||||
if (faceDistanceLength.Id is null)
|
||||
throw new NotSupportedException();
|
||||
if (faceDistanceLength.Length is null)
|
||||
throw new NotSupportedException();
|
||||
if (faceDistanceLength.WholePercentages is null)
|
||||
@ -13,8 +15,9 @@ internal abstract class Sorting
|
||||
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 / distanceTolerance * faceDistancePermyriad);
|
||||
result = new(daysDelta, distancePermyriad, faceDistanceLength.Id, older, faceDistanceLength.WholePercentages.Value);
|
||||
int distancePermyriad = (int)(faceDistanceLength.Length.Value * faceDistancePermyriad);
|
||||
bool canReMap = faceDistanceLength.MappingFromFilterPost?.CanReMap is not null && faceDistanceLength.MappingFromFilterPost.CanReMap.Value;
|
||||
result = new(canReMap, daysDelta, distancePermyriad, faceDistanceLength.Id.Value, older, faceDistanceLength.WholePercentages.Value);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user