mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
AK: Add to_radians and to_degrees math functions
This commit is contained in:
committed by
Sam Atkins
parent
9b7aa8f6b6
commit
494a8cb816
@@ -66,7 +66,7 @@ bool LinearGradientStyleValue::equals(StyleValue const& other_) const
|
||||
float LinearGradientStyleValue::angle_degrees(CSSPixelSize gradient_size) const
|
||||
{
|
||||
auto corner_angle_degrees = [&] {
|
||||
return atan2(gradient_size.height().to_double(), gradient_size.width().to_double()) * 180 / AK::Pi<double>;
|
||||
return AK::to_degrees(atan2(gradient_size.height().to_double(), gradient_size.width().to_double()));
|
||||
};
|
||||
return m_properties.direction.visit(
|
||||
[&](SideOrCorner side_or_corner) {
|
||||
|
||||
Reference in New Issue
Block a user