change metric units to cm (on request)

pull/29/head
Michael Aschauer 2017-06-15 23:14:37 +02:00
rodzic 10c5fa8e0f
commit 1d7c47a8b4
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -63,12 +63,14 @@ TurtleShepherd.prototype.getJumpCount = function() {
TurtleShepherd.prototype.getDimensions = function() {
if (this.metric) {
c = 1;
unit = "mm";
//c = 1;
//unit = "mm";
c = 0.1
unit = "cm";
} else {
c = 0.03937;
unit = "in";
}
}
w= ((this.maxX - this.minX)/5 * c).toFixed(2).toString();
h= ((this.maxY - this.minY)/5 * c).toFixed(2).toString();
return w + " x " + h + " " + unit;