限制启动位置的最大值和最小值

This commit is contained in:
ZouJin 2023-09-21 19:33:19 +08:00
parent 82ff631853
commit 7ba5701147

View File

@ -370,8 +370,8 @@ namespace VPet_Simulator.Windows.Interface
set
{
var line = FindorAddLine("startrecordlast");
line.SetDouble("x", value.X);
line.SetDouble("y", value.Y);
line.SetDouble("x", Math.Min(Math.Max(value.X, -65000), 65000));
line.SetDouble("y", Math.Min(Math.Max(value.Y, -65000), 65000));
}
}
/// <summary>
@ -389,8 +389,8 @@ namespace VPet_Simulator.Windows.Interface
set
{
var line = FindorAddLine("startrecord");
line.SetDouble("x", value.X);
line.SetDouble("y", value.Y);
line.SetDouble("x", Math.Min(Math.Max(value.X, -65000), 65000));
line.SetDouble("y", Math.Min(Math.Max(value.Y, -65000), 65000));
}
}
/// <summary>