]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Add abs() to float and double
authorSteven Oliver <oliver.steven@gmail.com>
Sun, 10 Apr 2016 13:49:49 +0000 (09:49 -0400)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 14 Apr 2016 07:00:55 +0000 (09:00 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=764663

vapi/glib-2.0.vapi

index b240b6b4de8843fe29344bf6a806fa087ce4081b..a618f617425bb4965f328170eb9d3e2e2a580942 100644 (file)
@@ -798,6 +798,8 @@ public struct float {
        public static float max (float a, float b);
        [CCode (cname = "CLAMP")]
        public float clamp (float low, float high);
+       [CCode (cname = "fabsf")]
+       public float abs ();
 }
 
 [SimpleType]
@@ -847,6 +849,8 @@ public struct double {
        public static double max (double a, double b);
        [CCode (cname = "CLAMP")]
        public double clamp (double low, double high);
+       [CCode (cname = "fabs")]
+       public double abs ();
 
        [CCode (cname = "G_ASCII_DTOSTR_BUF_SIZE")]
        public const int DTOSTR_BUF_SIZE;