summaryrefslogtreecommitdiff
path: root/gsk/gsktransform.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-02-02 13:20:40 +0100
committerMatthias Clasen <mclasen@redhat.com>2020-02-07 13:16:32 -0500
commitcbb05a3eabdf3fd57ed8ff2943bbae7812971e8e (patch)
tree70ef6ac6599fd72ca96880efbc3ebc450560f5f1 /gsk/gsktransform.c
parent4cfac3b91c484b1e141e5789bef6e3b24ecaa586 (diff)
downloadgtk+-cbb05a3eabdf3fd57ed8ff2943bbae7812971e8e.tar.gz
GskTransform: add assertions to make normalize_angle() intentions clear
360deg should be expressed as 0deg and no angle should ever be negative.
Diffstat (limited to 'gsk/gsktransform.c')
-rw-r--r--gsk/gsktransform.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c
index 5d9d538d4c..f116b79acd 100644
--- a/gsk/gsktransform.c
+++ b/gsk/gsktransform.c
@@ -834,6 +834,9 @@ normalize_angle (float angle)
if (f < 0)
f = 360 + f;
+ g_assert (f < 360.0);
+ g_assert (f >= 0.0);
+
return f;
}