mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-02 19:35:46 +00:00
26 lines
630 B
C#
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);
|
|
}
|
|
}
|