matician - v2.0.0
    Preparing search index...

    Function solveLinear

    • Solves a linear equation of the form ax + b = 0.

      Parameters

      • a: number

        Coefficient of x.

      • b: number

        Constant term.

      Returns number

      The solution x, or throws if a is zero.

      solveLinear(2, -4); // returns 2
      solveLinear(1, 3); // returns -3