Have ideas to improve npm?Join in the discussion! »

    basic-calculator-js

    1.0.1 • Public • Published

    Introduction

    Calculate is module wich makes easy for begginers to make operations

    Example

    const calculate = require("basic-calculator-js")
     
    var x = 50
    var y = 50
     
    console.log(calculate.multiply(50, 50))
    // Returns 2500

    Properties

    calculate.pi: Returns PI (3.141592653589793)

    calculate.e: Returns Eulner's number (2.718281828459045)

    Methods

    calculate.add(x, y): Returns the sum of x added to y.

    calculate.subtract(x, y): Returns the differente of y subtracted to x.

    calculate.multiply(x, y): Returns the product of x multiplied by y.

    calculate.divide(x, y): Returns the quotient of x divided by y. WARNING: If the divisor is set to 0, an error will be thrown.

    calculate.modulation(x, y): Returns the remainder of x divided by y. WARNING: If the divisor is set to 0, an error will be thrown.

    calculate.elevate(x, y): Returns the power of x elevated to y.

    calculate.sqrt(x): Returns the square root of x.

    Install

    npm i basic-calculator-js

    DownloadsWeekly Downloads

    3

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    4.47 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar