Rarity precision #319
Unanswered
CryptoPique
asked this question in
Help + Q&A
Replies: 2 comments
-
If I understand correctly, currently, the weight is calculated as I'm not clear on what you are trying to achieve though 🙇♂️ |
Beta Was this translation helpful? Give feedback.
0 replies
-
ah ok, so rarity is not up to 100 but up to the total sum of # I put |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I would like to know if there is a way to increase the rarity precision from 0 to 1000 instead of 0 - 100.
could this work ?
const getRarityWeight = (_path) => {
// check if there is an extension, if not, consider it a directory
const exp = /#(\d+(?:.\d{1,2})?)/;
const weight = exp.exec(_path);
const weightNumber = weight ? parseFloat(weight[1]).toFixed(3) : null;
if (!weightNumber || isNaN(weightNumber)) {
return "required";
}
return weightNumber;
};
Beta Was this translation helpful? Give feedback.
All reactions