1.0.1 • Published 4 years ago

osu-accuracy v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

osu-accuracy

Here are some code examples:

const accuracy = require('osu-accuracy');

// Get accuracy by objects and hit counts.
let acc_calc = new accuracy({ n300: 4544, n100: 4, n50: 0, nmiss: 0 }).value(4548);
console.log(acc_calc); // Returns 99.9413661682791

// Get a string representative of the class.
let classstring = new accuracy({ nobjects: 4522, percent: 97.11 }).toString();
console.log(classstring); // Returns "97.11% 4326x300 196x100 0x50 0xMiss"

// Get the hit counts by accuracy and objects count.
let hitcounts = new accuracy({ nobjects: 1454, percent: 76.11 }).toString();
console.log(hitcounts); // Returns "76.11% 933x300 521x100 0x50 0xMiss"