Commit b584d460 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

move math functions to GLib VAPI, remove math.vala

2007-08-28  Juerg Billeter  <j@bitron.ch>

	* vapi/Makefile.am, vapi/glib-2.0.vala, vapi/math.vala: move math
	  functions to GLib VAPI, remove math.vala

svn path=/trunk/; revision=515
parent 6ab8723f
2007-08-28 Jürg Billeter <j@bitron.ch>
* vapi/Makefile.am, vapi/glib-2.0.vala, vapi/math.vala: move math
functions to GLib VAPI, remove math.vala
2007-08-28 Jürg Billeter <j@bitron.ch> 2007-08-28 Jürg Billeter <j@bitron.ch>
* vala/valaclass.vala, vala/valaenum.vala, * vala/valaclass.vala, vala/valaenum.vala,
......
...@@ -37,7 +37,6 @@ dist_vapi_DATA = \ ...@@ -37,7 +37,6 @@ dist_vapi_DATA = \
libwnck-1.0.vala \ libwnck-1.0.vala \
libsoup-2.2.vala \ libsoup-2.2.vala \
libxml-2.0.vala \ libxml-2.0.vala \
math.vala \
pango.deps \ pango.deps \
pango.vala \ pango.vala \
poppler-glib.deps \ poppler-glib.deps \
......
/* glib-2.0.vala /* glib-2.0.vala
* *
* Copyright (C) 2006-2007 Jürg Billeter, Raffaele Sandrini * Copyright (C) 2006-2007 Jürg Billeter, Raffaele Sandrini
* Copyright (C) 2007 Mathias Hasselmann
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -19,6 +20,7 @@ ...@@ -19,6 +20,7 @@
* Author: * Author:
* Jürg Billeter <j@bitron.ch> * Jürg Billeter <j@bitron.ch>
* Raffaele Sandrini <rasa@gmx.ch> * Raffaele Sandrini <rasa@gmx.ch>
* Mathias Hasselmann <mathias.hasselmann@gmx.de>
*/ */
[CCode (cname = "gboolean", cheader_filename = "glib.h", type_id = "G_TYPE_BOOLEAN", marshaller_type_name = "BOOLEAN", get_value_function = "g_value_get_boolean", set_value_function = "g_value_set_boolean", default_value = "FALSE")] [CCode (cname = "gboolean", cheader_filename = "glib.h", type_id = "G_TYPE_BOOLEAN", marshaller_type_name = "BOOLEAN", get_value_function = "g_value_get_boolean", set_value_function = "g_value_set_boolean", default_value = "FALSE")]
...@@ -742,16 +744,163 @@ namespace GLib { ...@@ -742,16 +744,163 @@ namespace GLib {
public struct ValueArray { public struct ValueArray {
} }
[CCode (cheader_filename = "math.h")] [CCode (cprefix = "", cheader_filename = "math.h")]
public struct Math { public struct Math {
[CCode (cname = "sqrt")]
public static double sqrt (double v);
[CCode (cname = "G_E")] [CCode (cname = "G_E")]
public static double E; public static double E;
[CCode (cname = "G_PI")] [CCode (cname = "G_PI")]
public static double PI; public static double PI;
/* generated from <bits/mathcalls.h> of glibc */
public static double acos (double x);
public static float acosf (float x);
public static double asin (double x);
public static float asinf (float x);
public static double atan (double x);
public static float atanf (float x);
public static double atan2 (double y, double x);
public static float atan2f (float y, float x);
public static double cos (double x);
public static float cosf (float x);
public static double sin (double x);
public static float sinf (float x);
public static double tan (double x);
public static float tanf (float x);
public static double cosh (double x);
public static float coshf (float x);
public static double sinh (double x);
public static float sinhf (float x);
public static double tanh (double x);
public static float tanhf (float x);
public static void sincos (double x, out double sinx, ref double cosx);
public static void sincosf (float x, out float sinx, out float cosx);
public static double acosh (double x);
public static float acoshf (float x);
public static double asinh (double x);
public static float asinhf (float x);
public static double atanh (double x);
public static float atanhf (float x);
public static double exp (double x);
public static float expf (float x);
public static double frexp (double x, out int exponent);
public static float frexpf (float x, out int exponent);
public static double ldexp (double x, int exponent);
public static float ldexpf (float x, int exponent);
public static double log (double x);
public static float logf (float x);
public static double log10 (double x);
public static float log10f (float x);
public static double modf (double x, out double iptr);
public static float modff (float x, out float iptr);
public static double exp10 (double x);
public static float exp10f (float x);
public static double pow10 (double x);
public static float pow10f (float x);
public static double expm1 (double x);
public static float expm1f (float x);
public static double log1p (double x);
public static float log1pf (float x);
public static double logb (double x);
public static float logbf (float x);
public static double exp2 (double x);
public static float exp2f (float x);
public static double log2 (double x);
public static float log2f (float x);
public static double pow (double x, double y);
public static float powf (float x, float y);
public static double sqrt (double x);
public static float sqrtf (float x);
public static double hypot (double x, double y);
public static float hypotf (float x, float y);
public static double cbrt (double x);
public static float cbrtf (float x);
public static double ceil (double x);
public static float ceilf (float x);
public static double fabs (double x);
public static float fabsf (float x);
public static double floor (double x);
public static float floorf (float x);
public static double fmod (double x, double y);
public static float fmodf (float x, float y);
public static int isinf (double value);
public static int isinff (float value);
public static int finite (double value);
public static int finitef (float value);
public static double drem (double x, double y);
public static float dremf (float x, float y);
public static double significand (double x);
public static float significandf (float x);
public static double copysign (double x, double y);
public static float copysignf (float x, float y);
public static double nan (string tagb);
public static float nanf (string tagb);
public static int isnan (double value);
public static int isnanf (float value);
public static double j0 (double x0);
public static float j0f (float x0);
public static double j1 (double x0);
public static float j1f (float x0);
public static double jn (int x0, double x1);
public static float jnf (int x0, float x1);
public static double y0 (double x0);
public static float y0f (float x0);
public static double y1 (double x0);
public static float y1f (float x0);
public static double yn (int x0, double x1);
public static float ynf (int x0, float x1);
public static double erf (double x0);
public static float erff (float x0);
public static double erfc (double x0);
public static float erfcf (float x0);
public static double lgamma (double x0);
public static float lgammaf (float x0);
public static double tgamma (double x0);
public static float tgammaf (float x0);
public static double gamma (double x0);
public static float gammaf (float x0);
public static double lgamma_r (double x0, out int signgamp);
public static float lgamma_rf (float x0, out int signgamp);
public static double rint (double x);
public static float rintf (float x);
public static double nextafter (double x, double y);
public static float nextafterf (float x, float y);
public static double nexttoward (double x, double y);
public static float nexttowardf (float x, double y);
public static double remainder (double x, double y);
public static float remainderf (float x, float y);
public static double scalbn (double x, int n);
public static float scalbnf (float x, int n);
public static int ilogb (double x);
public static int ilogbf (float x);
public static double scalbln (double x, long n);
public static float scalblnf (float x, long n);
public static double nearbyint (double x);
public static float nearbyintf (float x);
public static double round (double x);
public static float roundf (float x);
public static double trunc (double x);
public static float truncf (float x);
public static double remquo (double x, double y, out int quo);
public static float remquof (float x, float y, out int quo);
public static long lrint (double x);
public static long lrintf (float x);
public static int64 llrint (double x);
public static int64 llrintf (float x);
public static long lround (double x);
public static long lroundf (float x);
public static int64 llround (double x);
public static int64 llroundf (float x);
public static double fdim (double x, double y);
public static float fdimf (float x, float y);
public static double fmax (double x, double y);
public static float fmaxf (float x, float y);
public static double fmin (double x, double y);
public static float fminf (float x, float y);
public static double fma (double x, double y, double z);
public static float fmaf (float x, float y, float z);
public static double scalb (double x, double n);
public static float scalbf (float x, float n);
} }
/* The Main Event Loop */ /* The Main Event Loop */
......
/* math.vala - Generated from <bits/mathcalls.h> of glibc.
*
* Copyright (C) 2007 Mathias Hasselmann
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Mathias Hasselmann <mathias.hasselmann@gmx.de>
*/
[CCode (lower_case_cprefix = "", cheader_filename = "math.h")]
namespace Math
{
public static double acos(double x);
public static float acosf(float x);
public static double asin(double x);
public static float asinf(float x);
public static double atan(double x);
public static float atanf(float x);
public static double atan2(double y, double x);
public static float atan2f(float y, float x);
public static double cos(double x);
public static float cosf(float x);
public static double sin(double x);
public static float sinf(float x);
public static double tan(double x);
public static float tanf(float x);
public static double cosh(double x);
public static float coshf(float x);
public static double sinh(double x);
public static float sinhf(float x);
public static double tanh(double x);
public static float tanhf(float x);
public static void sincos(double x, ref double sinx, ref double cosx);
public static void sincosf(float x, ref float sinx, ref float cosx);
public static double acosh(double x);
public static float acoshf(float x);
public static double asinh(double x);
public static float asinhf(float x);
public static double atanh(double x);
public static float atanhf(float x);
public static double exp(double x);
public static float expf(float x);
public static double frexp(double x, ref int exponent);
public static float frexpf(float x, ref int exponent);
public static double ldexp(double x, int exponent);
public static float ldexpf(float x, int exponent);
public static double log(double x);
public static float logf(float x);
public static double log10(double x);
public static float log10f(float x);
public static double modf(double x, ref double iptr);
public static float modff(float x, ref float iptr);
public static double exp10(double x);
public static float exp10f(float x);
public static double pow10(double x);
public static float pow10f(float x);
public static double expm1(double x);
public static float expm1f(float x);
public static double log1p(double x);
public static float log1pf(float x);
public static double logb(double x);
public static float logbf(float x);
public static double exp2(double x);
public static float exp2f(float x);
public static double log2(double x);
public static float log2f(float x);
public static double pow(double x, double y);
public static float powf(float x, float y);
public static double sqrt(double x);
public static float sqrtf(float x);
public static double hypot(double x, double y);
public static float hypotf(float x, float y);
public static double cbrt(double x);
public static float cbrtf(float x);
public static double ceil(double x);
public static float ceilf(float x);
public static double fabs(double x);
public static float fabsf(float x);
public static double floor(double x);
public static float floorf(float x);
public static double fmod(double x, double y);
public static float fmodf(float x, float y);
public static int isinf(double value);
public static int isinff(float value);
public static int finite(double value);
public static int finitef(float value);
public static double drem(double x, double y);
public static float dremf(float x, float y);
public static double significand(double x);
public static float significandf(float x);
public static double copysign(double x, double y);
public static float copysignf(float x, float y);
public static double nan(string tagb);
public static float nanf(string tagb);
public static int isnan(double value);
public static int isnanf(float value);
public static double j0(double x0);
public static float j0f(float x0);
public static double j1(double x0);
public static float j1f(float x0);
public static double jn(int x0, double x1);
public static float jnf(int x0, float x1);
public static double y0(double x0);
public static float y0f(float x0);
public static double y1(double x0);
public static float y1f(float x0);
public static double yn(int x0, double x1);
public static float ynf(int x0, float x1);
public static double erf(double x0);
public static float erff(float x0);
public static double erfc(double x0);
public static float erfcf(float x0);
public static double lgamma(double x0);
public static float lgammaf(float x0);
public static double tgamma(double x0);
public static float tgammaf(float x0);
public static double gamma(double x0);
public static float gammaf(float x0);
public static double lgamma_r(double x0, ref int signgamp);
public static float lgamma_rf(float x0, ref int signgamp);
public static double rint(double x);
public static float rintf(float x);
public static double nextafter(double x, double y);
public static float nextafterf(float x, float y);
public static double nexttoward(double x, double y);
public static float nexttowardf(float x, double y);
public static double remainder(double x, double y);
public static float remainderf(float x, float y);
public static double scalbn(double x, int n);
public static float scalbnf(float x, int n);
public static int ilogb(double x);
public static int ilogbf(float x);
public static double scalbln(double x, long n);
public static float scalblnf(float x, long n);
public static double nearbyint(double x);
public static float nearbyintf(float x);
public static double round(double x);
public static float roundf(float x);
public static double trunc(double x);
public static float truncf(float x);
public static double remquo(double x, double y, ref int quo);
public static float remquof(float x, float y, ref int quo);
public static long lrint(double x);
public static long lrintf(float x);
public static int64 llrint(double x);
public static int64 llrintf(float x);
public static long lround(double x);
public static long lroundf(float x);
public static int64 llround(double x);
public static int64 llroundf(float x);
public static double fdim(double x, double y);
public static float fdimf(float x, float y);
public static double fmax(double x, double y);
public static float fmaxf(float x, float y);
public static double fmin(double x, double y);
public static float fminf(float x, float y);
public static double fma(double x, double y, double z);
public static float fmaf(float x, float y, float z);
public static double scalb(double x, double n);
public static float scalbf(float x, float n);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment