mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-10-31 08:22:30 +01:00 
			
		
		
		
	Codestandards
This commit is contained in:
		| @@ -252,7 +252,6 @@ class GaussianDistribution | |||||||
|     private static function inverseErrorFunctionCumulativeTo(float $p): float |     private static function inverseErrorFunctionCumulativeTo(float $p): float | ||||||
|     { |     { | ||||||
|         // From page 265 of numerical recipes |         // From page 265 of numerical recipes | ||||||
|  |  | ||||||
|         if ($p >= 2.0) { |         if ($p >= 2.0) { | ||||||
|             return -100; |             return -100; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -16,9 +16,8 @@ use PHPUnit\Framework\Attributes\UsesClass; | |||||||
| #[UsesClass(GaussianDistribution::class)] | #[UsesClass(GaussianDistribution::class)] | ||||||
| class TruncatedGaussianCorrectionFunctionsTest extends TestCase | class TruncatedGaussianCorrectionFunctionsTest extends TestCase | ||||||
| { | { | ||||||
|      |     public function testvGreaterThan(): void | ||||||
|  |     { | ||||||
|     public function testVGreaterThan(): void { |  | ||||||
|         // Test values taken from Ralf Herbrich's F# TrueSkill implementation |         // Test values taken from Ralf Herbrich's F# TrueSkill implementation | ||||||
|         $want = 0.4181660649773850; |         $want = 0.4181660649773850; | ||||||
|         $tVar = 0.7495591915280050; |         $tVar = 0.7495591915280050; | ||||||
| @@ -26,7 +25,8 @@ class TruncatedGaussianCorrectionFunctionsTest extends TestCase | |||||||
|         $this->assertEqualsWithDelta($want, TruncatedGaussianCorrectionFunctions::vExceedsMargin($tVar, $eps), 1e-6); |         $this->assertEqualsWithDelta($want, TruncatedGaussianCorrectionFunctions::vExceedsMargin($tVar, $eps), 1e-6); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     public function testWGreaterThan(): void { |     public function testwGreaterThan(): void | ||||||
|  |     { | ||||||
|         // Test values taken from Ralf Herbrich's F# TrueSkill implementation |         // Test values taken from Ralf Herbrich's F# TrueSkill implementation | ||||||
|         $want = 0.4619049929317120; |         $want = 0.4619049929317120; | ||||||
|         $tVar = 0.7495591915280050; |         $tVar = 0.7495591915280050; | ||||||
| @@ -34,7 +34,8 @@ class TruncatedGaussianCorrectionFunctionsTest extends TestCase | |||||||
|         $this->assertEqualsWithDelta($want, TruncatedGaussianCorrectionFunctions::wExceedsMargin($tVar, $eps), 1e-6); |         $this->assertEqualsWithDelta($want, TruncatedGaussianCorrectionFunctions::wExceedsMargin($tVar, $eps), 1e-6); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     public function testVWithin(): void { |     public function testvWithin(): void | ||||||
|  |     { | ||||||
|         // Test values taken from Ralf Herbrich's F# TrueSkill implementation |         // Test values taken from Ralf Herbrich's F# TrueSkill implementation | ||||||
|         $want = -0.7485644072749330; |         $want = -0.7485644072749330; | ||||||
|         $tVar = 0.7495591915280050; |         $tVar = 0.7495591915280050; | ||||||
| @@ -42,7 +43,8 @@ class TruncatedGaussianCorrectionFunctionsTest extends TestCase | |||||||
|         $this->assertEqualsWithDelta($want, TruncatedGaussianCorrectionFunctions::vWithinMargin($tVar, $eps), 1e-6); |         $this->assertEqualsWithDelta($want, TruncatedGaussianCorrectionFunctions::vWithinMargin($tVar, $eps), 1e-6); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     public function testWWithin(): void { |     public function testwWithin(): void | ||||||
|  |     { | ||||||
|         // Test values taken from Ralf Herbrich's F# TrueSkill implementation |         // Test values taken from Ralf Herbrich's F# TrueSkill implementation | ||||||
|         $want = 0.9986734210033660; |         $want = 0.9986734210033660; | ||||||
|         $tVar = 0.7495591915280050; |         $tVar = 0.7495591915280050; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user