float-operation

0.0.3 • Public • Published

A library of JavaScript tools for floating-point calculation.

Load

The library is the single JavaScript file float-operation.js

Browser:

<script type="module">
import operation from './path/to/float-operation.js';
...
</script>

ES module:

import operation from 'float-operation';

Use

Use 4 methods of add()、sub()、mul()、division() to perform basic arithmetic operations.

import operation from 'float-operation'

console.log('add', operation.add(12.123456, 10.154))
console.log('substract', operation.sub(12.123456, 10.154))
console.log('multiply', operation.mul(12.123456, 10.154))
console.log('divide', operation.division(12.123456, 10.154))

Licence

MIT.

See LICENCE.md

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    3
  • 0.0.2
    0

Package Sidebar

Install

npm i float-operation

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

4.96 kB

Total Files

4

Last publish

Collaborators

  • bailenchen