Files
ryujinx/src/Ryujinx.HLE/HOS/Tamper/Conditions/CondGT.cs

26 lines
630 B
C#

using Ryujinx.HLE.HOS.Tamper.Operations;
using System.Numerics;
namespace Ryujinx.HLE.HOS.Tamper.Conditions
{
class CondGT<T> : ICondition where T : unmanaged, INumber<T>
{
private readonly IOperand _lhs;
private readonly IOperand _rhs;
public CondGT(IOperand lhs, IOperand rhs)
{
_lhs = lhs;
_rhs = rhs;
}
public bool Evaluate()
{
return _lhs.Get<T>() > _rhs.Get<T>();
}
public static ICondition CreateFor<T1>(IOperand lhs, IOperand rhs) where T1 : INumber<T1>
=> new CondGT<T>(lhs, rhs);
}
}