wip fix
This commit is contained in:
1 parent
9bcd4432c6
commit
6f92f9e1d5
1209 files changed
+220940
No files matched your search
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Utilities;
|
||||
|
||||
class Margin
|
||||
{
|
||||
public static function calculate($arr, $stellen = 3)
|
||||
{
|
||||
if (! is_array($arr)) {
|
||||
return false;
|
||||
}
|
||||
$r = 0;
|
||||
foreach ($arr as $value) {
|
||||
$value = $value < 1 ? 1 : $value;
|
||||
$r += 100 / $value;
|
||||
}
|
||||
|
||||
return round($r, $stellen);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user