Function tan

  • Returns the tangent of an angle in radians (can be in Bangla or English digits).

    Parameters

    • a: string | number

      Angle in radians (Bangla or English digits).

    • en: boolean = false

      If true, returns the result in English digits. Default is false (returns Bangla digits).

    • decimalPlaces: number = 12

      Number of decimal places to round the result. Default is 12.

    Returns string

    The tangent of a.

    tan("০"); // returns "০"
    tan(0, true); // returns "0"
    tan("০.৭৮৫", true); // returns "1"
    tan("১.৫৭"); // returns "০"

    If the input is invalid or not a number.