Created
November 19, 2019 11:14
-
-
Save Scribbio/284f408d191ea961c8bf50a45892e08a to your computer and use it in GitHub Desktop.
Revisions
-
Scribbio created this gist
Nov 19, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ using System; class Pi { /// Approximate pi from xy coordinates. /// <returns>an approximation of pi</returns public static double Approx(Point x, Point y) { Point point = new Point(); double r, per_cir; double PI = 3.14; double circleRadius = Math.Sqrt((point.x*point.x) + (point.y*point.y)); per_cir = 2 * PI * circleRadius; return per_cir ; } }