[librsvg] Simplify angle handling



commit 9ab81da702fe3b86bce1724452d097712822b037
Author: Christian Persch <chpe gnome org>
Date:   Sat Dec 3 19:13:18 2011 +0100

    Simplify angle handling

 rsvg-filter.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index 5dc59b4..f16c3d4 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -4053,7 +4053,7 @@ get_light_colour (RsvgNodeLightSource * source, vector3 colour,
 
     base = -dotproduct (L, s);
 
-    angle = acos (base) * 180.0 / M_PI;
+    angle = acos (base);
 
     if (base < 0 || angle > source->limitingconeAngle) {
         output.x = 0;
@@ -4085,7 +4085,7 @@ rsvg_node_light_source_set_atts (RsvgNode * self,
         if ((value = rsvg_property_bag_lookup (atts, "elevation")))
             data->elevation = rsvg_css_parse_angle (value) / 180.0 * M_PI;
         if ((value = rsvg_property_bag_lookup (atts, "limitingConeAngle")))
-            data->limitingconeAngle = rsvg_css_parse_angle (value);
+            data->limitingconeAngle = rsvg_css_parse_angle (value) / 180.0 * M_PI;
         if ((value = rsvg_property_bag_lookup (atts, "x")))
             data->x = data->pointsAtX = _rsvg_css_parse_length (value);
         if ((value = rsvg_property_bag_lookup (atts, "y")))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]