Skip to content

Commit a12cdb3

Browse files
authored
fix: unit format shouldnt enforce width (#12)
1 parent 7018e84 commit a12cdb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Unit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ public function substract()
434434
*/
435435
public function format($precision = 3, $addSymbol = true)
436436
{
437-
$format = '%02.' . $precision . 'f';
437+
$format = '%.' . $precision . 'f';
438438

439439
if (!$addSymbol) {
440440
return sprintf($format, $this->getValue());

0 commit comments

Comments
 (0)