1.0.1 • Published 4 years ago

basic-calculator-js v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

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.