Skip to content

Calculation of xOPS #1

Description

@kevinsherman

In ValuesBuilder.php, within the buildXOPS method, you're double counting AB's in your calculation. Where you have:

$OBPDenominator = $this->addArray($player, array("AB", "BB", "HBP", "SF"));
$player["xOPS"] = ($OBPDenominator + $player["AB"]) * ($player["OPS"] - $overallAverage);

I think you should just have:

$OBPDenominator = $this->addArray($player, array("AB", "BB", "HBP", "SF"));
$player["xOPS"] = ($OBPDenominator) * ($player["OPS"] - $overallAverage);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions