UNPKG

@nftgo/gorarity

Version:

An algorithm to calculate rarity of NFT(how special it is), based on Jaccard Distance.

9 lines (8 loc) 245 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.round = void 0; function round(n, precision) { const factor = Math.pow(10, precision); return Math.round(n * factor) / factor; } exports.round = round;