1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:37:36 +00:00

LibWeb: Change calc node representation from float to double

This commit is contained in:
stelar7 2023-05-27 21:10:21 +02:00 committed by Andreas Kling
parent f5da6d61b4
commit 421559d725
22 changed files with 75 additions and 75 deletions

View file

@ -232,7 +232,7 @@ Gfx::FloatMatrix4x4 StackingContext::get_transformation_matrix(CSS::Transformati
auto count = transformation.values.size();
auto value = [this, transformation](size_t index, Optional<CSS::Length const&> reference_length = {}) -> float {
return transformation.values[index].visit(
[this, reference_length](CSS::LengthPercentage const& value) -> float {
[this, reference_length](CSS::LengthPercentage const& value) -> double {
if (reference_length.has_value()) {
return value.resolved(m_box, reference_length.value()).to_px(m_box).value();
}
@ -240,9 +240,9 @@ Gfx::FloatMatrix4x4 StackingContext::get_transformation_matrix(CSS::Transformati
return value.length().to_px(m_box).value();
},
[this](CSS::AngleOrCalculated const& value) {
return value.resolved(m_box).to_degrees() * static_cast<float>(M_DEG2RAD);
return value.resolved(m_box).to_degrees() * M_DEG2RAD;
},
[](float value) {
[](double value) {
return value;
});
};