Skip to content

Simplified for v3#1

Merged
bpacholek merged 4 commits intomainfrom
simplified
Nov 14, 2025
Merged

Simplified for v3#1
bpacholek merged 4 commits intomainfrom
simplified

Conversation

@bpacholek
Copy link
Copy Markdown
Contributor

🚀 Major Changes

Breaking Changes

1. PHP 8.4+ Requirement

  • Upgraded minimum PHP version from 8.2 to 8.4
  • Reason: Utilizes new bcmath precision functions for enhanced mathematical accuracy
  • Impact: Projects running PHP 8.2/8.3 must upgrade to use this version

2. Probability Simplification

  • Before: getProbability(): string returning formatted percentage (e.g., "40.00")
  • After: getProbability(): int returning integer percentage (e.g., 40)
  • Benefits:
    • Simplified calculations and comparisons
    • Better performance with integer operations
    • More intuitive for conditional logic
    • Consistent with internal fixed precision integer system

3. Fixed Precision Integer Architecture

  • New primary parameter: Odds constructor now takes int $fixedPrecisionOdds as first parameter
  • Internal representation: All odds now stored as integers (decimal × 100)
  • Examples:
    • 1.25 decimal odds → 125 fixed precision integer
    • 2.50 decimal odds → 250 fixed precision integer
    • 10.00 decimal odds → 1000 fixed precision integer

@bpacholek bpacholek merged commit fbd23d5 into main Nov 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant