本文整理汇总了C#中GeometryTutorLib.ConcreteAST.Segment.IsPerpendicularTo方法的典型用法代码示例。如果您正苦于以下问题:C# Segment.IsPerpendicularTo方法的具体用法?C# Segment.IsPerpendicularTo怎么用?C# Segment.IsPerpendicularTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeometryTutorLib.ConcreteAST.Segment
的用法示例。
在下文中一共展示了Segment.IsPerpendicularTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AreOrthognal
//
// Orthogonal Circles intersect at 90^0: radii connecting to intersection point are perpendicular
//
public bool AreOrthognal(Circle thatCircle)
{
// Find the intersection points
Point inter1;
Point inter2;
FindIntersection(thatCircle, out inter1, out inter2);
// If the circles intersect at 0 points.
if (inter1 == null) return false;
// If the circles intersect at 1 point they are tangent
if (inter2 == null) return false;
// Create two radii, one for each circle; arbitrarily choose the first point (both work)
Segment radiusThis = new Segment(this.center, inter1);
Segment radiusThat = new Segment(this.center, inter1);
return radiusThis.IsPerpendicularTo(radiusThat);
}