doublerange.cs
来自「破解的飞信源代码」· CS 代码 · 共 77 行
CS
77 行
namespace Imps.Client.Utils
{
using System;
public class DoubleRange
{
private double max;
private double min;
public DoubleRange(double min, double max)
{
this.min = min;
this.max = max;
}
public bool IsInside(DoubleRange range)
{
if (this.IsInside(range.min))
{
return this.IsInside(range.max);
}
return false;
}
public bool IsInside(double x)
{
if (x >= this.min)
{
return (x <= this.max);
}
return false;
}
public bool IsOverlapping(DoubleRange range)
{
if (!this.IsInside(range.min))
{
return this.IsInside(range.max);
}
return true;
}
public double Length
{
get
{
return (this.max - this.min);
}
}
public double Max
{
get
{
return this.max;
}
set
{
this.max = value;
}
}
public double Min
{
get
{
return this.min;
}
set
{
this.min = value;
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?