/// <summary> /// Finds a geometric center of three given HeightPoints. /// </summary> /// <param name="a">First point.</param> /// <param name="b">Second point.</param> /// <param name="c">Third point.</param> /// <returns>HeightPoint exactly in the middle (both positionally and by height) of a, b and c.</returns> public static HeightPoint Midpoint(HeightPoint a, HeightPoint b, HeightPoint c) { return((a + b + c) / 3); }
/// <summary> /// Finds a geometric center of four given HeightPoints. /// </summary> /// <param name="a">First point.</param> /// <param name="b">Second point.</param> /// <param name="c">Third point.</param> /// <param name="d">Fourth point.</param> /// <returns>HeightPoint exactly in the middle (both positionally and by height) of a, b, c and d.</returns> public static HeightPoint Midpoint(HeightPoint a, HeightPoint b, HeightPoint c, HeightPoint d) { return((a + b + c + d) / 4); }
/// <summary> /// Finds a geometric center of two given HeightPoints. /// </summary> /// <param name="a">First point.</param> /// <param name="b">Second point.</param> /// <returns>HeightPoint exactly in the middle (both positionally and by height) of a and b.</returns> public static HeightPoint Midpoint(HeightPoint a, HeightPoint b) { return((a + b) / 2); }