Using DenseVector and Range properly, deleted unused code from RGB565 test

This commit is contained in:
Vladyslav Baranovskyi
2024-11-07 14:53:52 +02:00
parent 6013e47b59
commit 73250e0b37
2 changed files with 2 additions and 6 deletions

View File

@@ -167,7 +167,7 @@ namespace c4
size_t ret = ryml::unformat(buf, "({},{},{})", x, y, z);
if (ret != ryml::yml::npos)
{
*vec = DenseVector3i<T, REDUCE_Y_RESOLUTION, ASSERT_INPUT_VALUES, BITS_PER_COMPONENT>(x, y, z);
*vec = OpenVulkano::Math::DenseVector3i<T, REDUCE_Y_RESOLUTION, ASSERT_INPUT_VALUES, BITS_PER_COMPONENT>(x, y, z);
return true;
}
return false;
@@ -202,7 +202,7 @@ namespace c4
size_t ret = ryml::unformat(buf, "[{},{}]", minVal, maxVal);
if (ret != ryml::yml::npos)
{
*range = Range<T>(minVal, maxVal);
*range = OpenVulkano::Math::Range<T>(minVal, maxVal);
return true;
}
return false;

View File

@@ -184,10 +184,6 @@ TEST_CASE("test_rgb565_operators", "[RGB565]")
rgb1 -= delta;
uint8_t r = rgb1.GetR();
uint8_t g = rgb1.GetG();
uint8_t b = rgb1.GetB();
REQUIRE(rgb1.GetR() == 82);
REQUIRE(rgb1.GetG() == 24);
REQUIRE(rgb1.GetB() == 0); // Expect to clamp here