npm

Need private packages and team management tools?Check out npm Orgs. »

fixed2float

1.1.1 • Public • Published

NPM version

fixed2float

Convert fixed point to float and vice-versa

Usage

const f2f = require('fixed2float');
 
let m = 6;
let n = 10;
// To convert floating point to Qmn fixed point
console.log(f2f.toFixed(0.5, m, n); // will output 0x200
 
// To convert Qmn fixed point to floating point
console.log(f2f.toFloat(0x200, m, n); // will output 0.5

install

npm i fixed2float

Downloadsweekly downloads

9

version

1.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability