mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
ceil to floor for map min and max
This commit is contained in:
parent
4416fa5d64
commit
6f40f29d84
3 changed files with 485 additions and 1 deletions
|
@ -51,7 +51,7 @@ module.exports = async (req, res) => {
|
|||
list = list.filter(item => !author || (item.owner && item.owner._id === author));
|
||||
|
||||
let limits = list.reduce(({ min, max }, { distance: dist }) => ({
|
||||
min: Math.ceil(Math.min(dist, min) / 25) * 25,
|
||||
min: Math.floor(Math.min(dist, min) / 25) * 25,
|
||||
max: Math.ceil(Math.max(dist, max) / 25) * 25,
|
||||
}), { min: 999999, max: 0 });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue