Increase precision kept for kilogram values.

This commit is contained in:
Ian Gulliver
2016-01-06 00:35:37 -08:00
parent 259e6680d3
commit 7c3a19bf89

View File

@@ -591,7 +591,7 @@ BabyStats.prototype.buildLayout_ = function() {
var lb = ( var lb = (
(parseFloat(this.weightLb_.value) || 0) + (parseFloat(this.weightLb_.value) || 0) +
((parseFloat(this.weightOz_.value) || 0) / 16)); ((parseFloat(this.weightOz_.value) || 0) / 16));
this.weightKg_.value = Math.round((lb / 2.2046) * 10) / 10; this.weightKg_.value = Math.round((lb / 2.2046) * 100) / 100;
}.bind(this); }.bind(this);
this.weightLb_ = document.createElement('input'); this.weightLb_ = document.createElement('input');