mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-09-11 18:41:50 +00:00
Bei Teilnehmerzahl 1 oder weniger eines Ranglistenturnieres werden ohne weitere Berechnung 0 Punkte vergeben.
This commit is contained in:
@@ -19,11 +19,17 @@ require_once JPATH_SITE . '/components/com_sportsmanager/database/init.php';
|
|||||||
|
|
||||||
/** @noinspection PhpUnused */
|
/** @noinspection PhpUnused */
|
||||||
function mathParserVerteilung($rohpunkte, $platz, $teilnehmer, $multiplikator) {
|
function mathParserVerteilung($rohpunkte, $platz, $teilnehmer, $multiplikator) {
|
||||||
|
if ($teilnehmer <= 1){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return max(round($multiplikator * round(((($rohpunkte - 1) * (-log($platz / $teilnehmer) * (1 - ($platz / $teilnehmer)))) / (-log(1 / $teilnehmer) * (1 - (1 / $teilnehmer)))) + 1)), 1);
|
return max(round($multiplikator * round(((($rohpunkte - 1) * (-log($platz / $teilnehmer) * (1 - ($platz / $teilnehmer)))) / (-log(1 / $teilnehmer) * (1 - (1 / $teilnehmer)))) + 1)), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @noinspection PhpUnused */
|
/** @noinspection PhpUnused */
|
||||||
function mathParserVerteilungR($rohpunkte, $platz, $teilnehmer, $multiplikator) {
|
function mathParserVerteilungR($rohpunkte, $platz, $teilnehmer, $multiplikator) {
|
||||||
|
if ($teilnehmer <= 1){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return max(round(((($multiplikator * $rohpunkte - 1) * (-log($platz / $teilnehmer) * (1 - ($platz / $teilnehmer)))) / (-log(1 / $teilnehmer) * (1 - (1 / $teilnehmer)))) + 1), 1);
|
return max(round(((($multiplikator * $rohpunkte - 1) * (-log($platz / $teilnehmer) * (1 - ($platz / $teilnehmer)))) / (-log(1 / $teilnehmer) * (1 - (1 / $teilnehmer)))) + 1), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user