Add filter to round gold > 999 to nearest thousand

This commit is contained in:
benmanley 2014-04-08 16:43:58 +01:00
parent 834828ce74
commit c80f7671db

View file

@ -13,4 +13,9 @@ angular.module('habitrpg')
return function(html){
return $('<div/>').html(html).text();
}
})
.filter('goldRoundThousandsToK', function(){
return function (gp) {
return (gp > 999) ? (Math.floor(gp / 100) / 10.0 + 'K') : gp;
}
})