| 15 | "URLab.Color.Halton_Base2", |
| 16 | EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter) |
| 17 | bool FMjColorHaltonBase2::RunTest(const FString& Parameters) |
| 18 | { |
| 19 | const float Expected[] = {0.5f, 0.25f, 0.75f, 0.125f, 0.625f, 0.375f, 0.875f}; |
| 20 | for (int32 i = 0; i < UE_ARRAY_COUNT(Expected); ++i) |
| 21 | { |
| 22 | const float V = MjColor::Halton(i + 1, 2); |
| 23 | TestTrue(FString::Printf(TEXT("Halton(%d,2) ~= %f"), i + 1, Expected[i]), |
| 24 | FMath::IsNearlyEqual(V, Expected[i], 1e-5f)); |
| 25 | } |
| 26 | return true; |
| 27 | } |
| 28 | |
| 29 | // Halton(0, base) must return 0 and never loop forever. |
| 30 | IMPLEMENT_SIMPLE_AUTOMATION_TEST(FMjColorHaltonZero, |
nothing calls this directly
no test coverage detected