Adding
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
namespace LCU.Library.Internal.IncentiveApiModels.Entities
|
||||
{
|
||||
public class PayoutRange
|
||||
{
|
||||
public const double NOLIMIT = -1.0;
|
||||
public double MinimumPercentage { get; }
|
||||
public double MaximumPercentage { get; }
|
||||
public int Payout { get; }
|
||||
|
||||
public PayoutRange(double minimumPercentage, double maximumPercentage, int payout)
|
||||
{
|
||||
MinimumPercentage = minimumPercentage;
|
||||
MaximumPercentage = maximumPercentage;
|
||||
Payout = payout;
|
||||
}
|
||||
|
||||
public bool IsInRange(double percentage)
|
||||
{
|
||||
return percentage >= MinimumPercentage && (percentage <= MaximumPercentage || MaximumPercentage == NOLIMIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user