Made hero attribute reactive and iterated inventory UI
This commit is contained in:
6
rpg-docs/client/globalHelpers/round.js
Normal file
6
rpg-docs/client/globalHelpers/round.js
Normal file
@@ -0,0 +1,6 @@
|
||||
Template.registerHelper("round", function(value, decimalPlaces){
|
||||
decimalPlaces = +decimalPlaces || 2;
|
||||
var num = +value;
|
||||
var tens = Math.pow(10, decimalPlaces)
|
||||
return Math.round(num * tens) / tens;
|
||||
});
|
||||
Reference in New Issue
Block a user