Commit ec98dc2a authored by 潘栩锋's avatar 潘栩锋 🚴

1. 修复 RangeF

parent f1354a85
...@@ -34,7 +34,7 @@ namespace Misc ...@@ -34,7 +34,7 @@ namespace Misc
{ {
get get
{ {
if (!double.IsNaN(Begin)) if (IsValid)
return (End + Begin) / 2; return (End + Begin) / 2;
else else
return double.NaN; return double.NaN;
...@@ -50,9 +50,9 @@ namespace Misc ...@@ -50,9 +50,9 @@ namespace Misc
get get
{ {
if (IsValid) if (IsValid)
return End - Begin + 1; return End - Begin;
else else
return Misc.MyBase.NULL_VALUE; return double.NaN;
} }
} }
...@@ -117,7 +117,7 @@ namespace Misc ...@@ -117,7 +117,7 @@ namespace Misc
/// 平移 /// 平移
/// </summary> /// </summary>
/// <param name="offset"></param> /// <param name="offset"></param>
public void Move(int offset) public void Move(double offset)
{ {
Begin += offset; Begin += offset;
End += offset; End += offset;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment