public static double hypotenuseSquare(XYCoord n) => n.x * n.x + n.y * n.y;
//Create a function which takes an x, y coordinate struct and returns a double // corresponding to the hypotenuse of a triangle with sides of lengths x, y. //Func<XYCoord, double> hypotenuse = n => Math.Sqrt(Math.Pow(n.x, 2) + Math.Pow(n.y, 2)); public static double hypotenuse(XYCoord n) => Math.Sqrt(Math.Pow(n.x, 2) + Math.Pow(n.y, 2));