23 lines
715 B
C#
23 lines
715 B
C#
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);
|
|
}
|
|
}
|
|
}
|