Explorar el Código

LibWeb: Fix calculation of degrees from radians

Thomas Fach-Pedersen hace 3 años
padre
commit
83c79fec1c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Userland/Libraries/LibWeb/CSS/Angle.cpp

+ 1 - 1
Userland/Libraries/LibWeb/CSS/Angle.cpp

@@ -58,7 +58,7 @@ float Angle::to_degrees() const
     case Type::Grad:
     case Type::Grad:
         return m_value * (360.0f / 400.0f);
         return m_value * (360.0f / 400.0f);
     case Type::Rad:
     case Type::Rad:
-        return m_value * (360.0f / 2 * AK::Pi<float>);
+        return m_value * (180.0f / AK::Pi<float>);
     case Type::Turn:
     case Type::Turn:
         return m_value * 360.0f;
         return m_value * 360.0f;
     }
     }