Skip to content
This repository was archived by the owner on Jan 27, 2019. It is now read-only.

Commit 3e4f046

Browse files
author
Adam Renaud
committed
Adding Area to the Circle Entity
1 parent 141edae commit 3e4f046

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Dxflib/Entities/Circle.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//
1010
// ============================================================
1111

12+
using System;
1213
using Dxflib.Geometry;
1314

1415
namespace Dxflib.Entities
@@ -44,5 +45,10 @@ public Circle(CircularArcBuffer cb) : base(cb)
4445
/// The Radius of the Circle
4546
/// </summary>
4647
public double Radius { get; set; }
48+
49+
/// <summary>
50+
/// The Area of the circle (Pi*Radius^2)
51+
/// </summary>
52+
public double Area => Math.PI * Math.Pow(Radius, 2);
4753
}
4854
}

0 commit comments

Comments
 (0)