Skip to content

Commit

Permalink
Merge pull request #6 from dotnet-campus/t/lindexi/Segment2D
Browse files Browse the repository at this point in the history
给线段添加向量属性
  • Loading branch information
SeWZC authored Nov 6, 2024
2 parents f8fc62f + 04bc231 commit 37d7144
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DotNetCampus.Numerics.Geometry/Segment2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public static Segment2D Create(Point2D point1, Point2D point2)
/// </summary>
public Point2D EndPoint => StartPoint + UnitDirectionVector * Length;

/// <summary>
/// 获取线段的向量。
/// </summary>
public Vector2D DirectionVector => UnitDirectionVector * Length;

/// <summary>
/// 获取线段的单位方向向量。
/// </summary>
Expand Down

0 comments on commit 37d7144

Please sign in to comment.