make Ox.formatUnit return 3 decimals
This commit is contained in:
parent
b3ed2db267
commit
6cf769b740
1 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ Ox.formatArea = function(num, dec) {
|
|||
return Ox.formatNumber(
|
||||
(km ? num / 1000000 : num).toPrecision(8)
|
||||
) + ' ' + (km ? 'k' : '') + 'm\u00B2';
|
||||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.formatColor <f> (strange one)
|
||||
|
@ -572,7 +572,7 @@ Ox.formatString = function (str, obj) {
|
|||
return str.replace(/\{([^}]+)\}/g, function(str, match) {
|
||||
return obj[match];
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.formatValue <f> Formats a numerical value
|
||||
|
@ -602,5 +602,5 @@ Ox.formatValue = function(num, str, bin) {
|
|||
Ox.formatUnit <f> Formats a number with a unit
|
||||
@*/
|
||||
Ox.formatUnit = function(num, str) {
|
||||
return num + ' ' + str;
|
||||
}
|
||||
return Ox.formatNumber(num, 3) + ' ' + str;
|
||||
};
|
Loading…
Reference in a new issue