本文整理汇总了C#中IZone.Distance方法的典型用法代码示例。如果您正苦于以下问题:C# IZone.Distance方法的具体用法?C# IZone.Distance怎么用?C# IZone.Distance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IZone
的用法示例。
在下文中一共展示了IZone.Distance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Feasible
public bool Feasible(IZone origin, IZone destination, Time timeOfDay)
{
return CurrentlyFeasible > 0 && origin.Distance( destination ) <= MaxWalkDistance;
}
示例2: TravelTime
/// <summary>
/// The Time it takes to walk between two zones
/// Time of day does not effect this for walking
/// </summary>
/// <param name="origin">The origin of Travel</param>
/// <param name="destination">The destination of Travel</param>
/// <param name="time">The Time of Day</param>
/// <returns>The Time it takes to walk from origin to destination</returns>
public Time TravelTime(IZone origin, IZone destination, Time time)
{
double distance = origin == destination ? origin.InternalDistance : origin.Distance( destination );
Time ret = Time.FromMinutes( (float)( distance / this.AvgWalkSpeed ) );
return ret;
}
示例3: DistanceRequirement
private bool DistanceRequirement(IZone iZone, IZone iZone_2, ITashaPerson iPerson)
{
int grade = GetGrade( iPerson );
double distance = iZone.Distance( iZone_2 );
if ( ( grade > 0 ) & ( grade < 6 ) )
return distance > 1600;
else if ( grade < 9 )
return distance > 3200;
else if ( grade < 13 )
return distance > 4800;
else
return false;
}