summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/Angle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Angle.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Angle.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Angle.cpp b/Userland/Libraries/LibWeb/CSS/Angle.cpp
index 2b0ae58622..37acc9ad65 100644
--- a/Userland/Libraries/LibWeb/CSS/Angle.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Angle.cpp
@@ -16,13 +16,13 @@ Angle::Angle(int value, Type type)
{
}
-Angle::Angle(float value, Type type)
+Angle::Angle(double value, Type type)
: m_type(type)
, m_value(value)
{
}
-Angle Angle::make_degrees(float value)
+Angle Angle::make_degrees(double value)
{
return { value, Type::Deg };
}
@@ -37,17 +37,17 @@ ErrorOr<String> Angle::to_string() const
return String::formatted("{}deg", to_degrees());
}
-float Angle::to_degrees() const
+double Angle::to_degrees() const
{
switch (m_type) {
case Type::Deg:
return m_value;
case Type::Grad:
- return m_value * (360.0f / 400.0f);
+ return m_value * (360.0 / 400.0);
case Type::Rad:
- return m_value * (180.0f / AK::Pi<float>);
+ return m_value * (180.0 / AK::Pi<double>);
case Type::Turn:
- return m_value * 360.0f;
+ return m_value * 360.0;
}
VERIFY_NOT_REACHED();
}