Function ellipseArea

  • Function calculates area of an ellipse based on its diameters in both axis

    Parameters

    • majorAxisDiameter: number

      Positive value of the first radius of the ellipse

    • minorAxisDiameter: number

      Positive value of the second radius of the ellipse

    Returns number

    Value of square area of ellipse

    The formula for the area of an ellipse is $ A = π * a * b $, where a and b are the radii on the major and the minor axes, respectively. This function however calculates area of ellipse based on its diameters in both axis.

    import { circleArea } from 'simple-mathematic';

    circleArea(5); // 78.53981633974483