Math.divide()

Divide one number by another and return the quotient.

Note that this is **not** integer division-- e.g. `5/2` will result in `2.5`, not `2`.

Usage

Hover over inputs/exits for more info.

var Math = require('machinepack-math');


// Divide one number by another and return the quotient.

Math.divide({

a: 5,

b: -2,

}).execSync();

Inputs

a required

The number to divide (aka "dividend")

5
b required

The number to divide by (aka "divisor")

-2

Exits

error

An unexpected error occurred.

invalidDenominator

The denominator was provided as 0, but computers haven't learned how to divide by zero (yet).

success

OK.

-2.5