Move const usage out of Shared
This commit is contained in:
.vscode
FaceRecognitionDotNet
Instance/Models
Map/Models
Property/Models/Stateless
Shared
.vscode
Models
Tests
package.json@ -3,7 +3,7 @@ namespace View_by_Distance.Shared.Models.Stateless.Methods;
|
||||
internal abstract class Sorting
|
||||
{
|
||||
|
||||
internal static Models.Sorting Get(Models.FaceDistance faceDistanceEncoding, Models.FaceDistance faceDistanceLength, bool anyLowerThanTolerance, List<(long lcl, long minimum, long maximum, long ucl)> personKeysRangesCollection)
|
||||
internal static Models.Sorting Get(int faceDistancePermyriad, double faceDistanceTolerance, Models.FaceDistance faceDistanceEncoding, Models.FaceDistance faceDistanceLength, bool anyLowerThanTolerance, List<(long lcl, long minimum, long maximum, long ucl)> personKeysRangesCollection)
|
||||
{
|
||||
Models.Sorting result;
|
||||
if (faceDistanceLength.Length is null)
|
||||
@ -14,7 +14,7 @@ internal abstract class Sorting
|
||||
int daysDelta;
|
||||
int withinRange;
|
||||
int distancePermyriad;
|
||||
if (faceDistanceLength.Length.Value == 0 || (anyLowerThanTolerance && faceDistanceLength.Length.Value >= Stateless.IFaceDistance.Tolerance))
|
||||
if (faceDistanceLength.Length.Value == 0 || (anyLowerThanTolerance && faceDistanceLength.Length.Value >= faceDistanceTolerance))
|
||||
{
|
||||
older = false;
|
||||
daysDelta = 0;
|
||||
@ -30,7 +30,7 @@ internal abstract class Sorting
|
||||
TimeSpan timeSpan = new(faceDistanceLength.MinimumDateTime.Value.Ticks - ticks);
|
||||
older = timeSpan.TotalMilliseconds < 0;
|
||||
daysDelta = (int)Math.Round(Math.Abs(timeSpan.TotalDays), 0);
|
||||
distancePermyriad = (int)(faceDistanceLength.Length.Value / Stateless.IFaceDistance.Tolerance * Stateless.IFaceDistance.Permyriad);
|
||||
distancePermyriad = (int)(faceDistanceLength.Length.Value / faceDistanceTolerance * faceDistancePermyriad);
|
||||
foreach ((long lcl, long minimum, long maximum, long ucl) in personKeysRangesCollection)
|
||||
{
|
||||
if (ticks > minimum && ticks < maximum)
|
||||
|
Reference in New Issue
Block a user