mscherer 6 年之前
父节点
当前提交
a578c536ab
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      docs/Helper/Progress.md

+ 5 - 3
docs/Helper/Progress.md

@@ -46,10 +46,12 @@ This can be used if you want to customize the usage.
 
 This method is responsible for the above min/max handling.
 It can be also used standalone.
-```php
-// For $value 0.49 it outputs: 49% 
-echo $this->Number->toPercentage($this->calculatePercentage($value), 0, ['multiply' => true]);
+```php 
+$percentage = $this->Progress->calculatePercentage($value);
+echo $this->Number->toPercentage($percentage, 0, ['multiply' => true]);
 ```
+For value `0.49` it outputs: `49%`, for value `0.0001` it outputs `1%`.
+And of course `0.99999` should still be "only" `99%`.
 
 ## Tips