mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
shared-code-percent
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// TODO move to client
|
||||
|
||||
module.exports = function(x, y, dir) {
|
||||
var roundFn;
|
||||
module.exports = function percent (x, y, dir) {
|
||||
let roundFn;
|
||||
switch (dir) {
|
||||
case "up":
|
||||
case 'up':
|
||||
roundFn = Math.ceil;
|
||||
break;
|
||||
case "down":
|
||||
case 'down':
|
||||
roundFn = Math.floor;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user